:root {
    --primary-color: #4F46E5;
    --secondary-color: #06B6D4;
    --dark-color: #1E293B;
    --light-color: #F8FAFC;
    --success-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
}

/* Navbar */
.navbar-custom {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: white !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Buttons */
.btn-custom-primary {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    transition: all 0.3s;
}

.btn-custom-primary:hover {
    background: #4338CA;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}

.btn-custom-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    background: transparent;
    transition: all 0.3s;
}

.btn-custom-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Package Cards */
.package-card {
    border: 2px solid #E2E8F0;
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.3s;
    background: white;
    height: 100%;
}

.package-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.package-card.featured {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.2);
}

.package-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
}

.package-price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 1rem 0;
}

.package-price span {
    font-size: 1.25rem;
    font-weight: 400;
    color: #64748B;
}

.package-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.package-features li {
    padding: 0.75rem 0;
    color: #475569;
    display: flex;
    align-items: center;
}

.package-features li i {
    color: var(--success-color);
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

/* Auth Forms */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 100%;
}

.auth-card h2 {
    color: var(--dark-color);
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

.form-control {
    padding: 0.875rem 1rem;
    border-radius: 10px;
    border: 2px solid #E2E8F0;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.1);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Dashboard */
.dashboard-sidebar {
    background: white;
    min-height: 100vh;
    padding: 2rem 0;
    border-right: 1px solid #E2E8F0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: #64748B;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s;
    font-weight: 500;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.sidebar-menu a i {
    margin-right: 1rem;
    font-size: 1.25rem;
}

/* Submenu Styles */
.sidebar-menu .has-submenu {
    position: relative;
}

.sidebar-menu .submenu-toggle {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-menu .submenu-arrow {
    margin-left: auto;
    margin-right: 0;
    font-size: 0.875rem;
    transition: transform 0.3s ease;
}

.sidebar-menu .has-submenu.submenu-open .submenu-arrow {
    transform: rotate(180deg);
}

.sidebar-menu .submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.sidebar-menu .submenu.show {
    max-height: 300px;
    opacity: 1;
    margin-top: 0.5rem;
}

.sidebar-menu .submenu li {
    margin-bottom: 0;
}

.sidebar-menu .submenu a {
    padding: 0.75rem 1.5rem 0.75rem 3rem;
    font-size: 0.925rem;
    color: #64748B;
    background: transparent;
}

.sidebar-menu .submenu a:hover {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
}

.sidebar-menu .submenu a.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.sidebar-menu .submenu a i {
    font-size: 1rem;
}

.sidebar-menu .has-submenu.submenu-open > .submenu-toggle {
    background: transparent;
    color: var(--primary-color);
}

.dashboard-header {
    background: white;
    padding: 1.5rem;
    border-bottom: 1px solid #E2E8F0;
    margin-bottom: 2rem;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
    margin-right: 1rem;
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem 1.25rem;
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
}

.alert-danger {
    background: #FEE2E2;
    color: #991B1B;
}

/* Stats Cards */
.stat-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #64748B;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Mobile Sidebar Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.75rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
}

/* Only show hamburger on mobile/tablet */
@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: flex !important;
    }
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.mobile-overlay.active {
    display: block;
}

/* Responsive Tablet (768px - 991px) */
@media (max-width: 991px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section p {
        font-size: 1.1rem;
    }
    
    .package-card {
        margin-bottom: 2rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
}

/* Responsive Mobile (max-width: 768px) */
@media (max-width: 768px) {
    /* Landing Page */
    .hero-section {
        padding: 50px 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .btn-custom-primary,
    .btn-custom-outline {
        padding: 0.625rem 1.5rem;
        font-size: 0.95rem;
    }
    
    /* Navbar */
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    /* Package Cards */
    .package-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .package-price {
        font-size: 2.5rem;
    }
    
    /* Auth Forms */
    .auth-card {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }
    
    .auth-card h2 {
        font-size: 1.75rem;
    }
    
    /* Dashboard */
    .mobile-menu-toggle {
        display: flex !important;
    }
    
    .dashboard-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .dashboard-sidebar.mobile-active {
        left: 0;
    }
    
    .dashboard-header {
        padding: 1rem;
        margin-top: 70px;
    }
    
    .dashboard-header h4 {
        font-size: 1.25rem;
    }
    
    .user-info {
        flex-direction: column;
        align-items: flex-start;
        font-size: 0.875rem;
    }
    
    .user-avatar {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    /* Content padding adjustment for mobile toggle button */
    .flex-grow-1 {
        margin-left: 0 !important;
    }
    
    /* Stats Cards */
    .stat-card {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* Cards */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Extra Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .hero-section p {
        font-size: 0.95rem;
    }
    
    .package-card {
        padding: 1.25rem;
    }
    
    .package-price {
        font-size: 2rem;
    }
    
    .auth-card {
        padding: 1.5rem 1rem;
    }
    
    .btn-custom-primary,
    .btn-custom-outline {
        padding: 0.5rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .dashboard-sidebar {
        width: 260px;
        left: -260px;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .mobile-menu-toggle {
        top: 15px;
        left: 15px;
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .dashboard-sidebar {
        padding: 1rem 0;
    }
    
    .sidebar-menu a {
        padding: 0.5rem 1rem;
    }
    
    .hero-section {
        padding: 40px 0;
    }
}

/* Print Styles */
@media print {
    .dashboard-sidebar,
    .mobile-menu-toggle,
    .mobile-overlay {
        display: none !important;
    }
    
    .flex-grow-1 {
        margin-left: 0 !important;
    }
}

/* Responsive table improvements */
@media (max-width: 1200px) {
    .table-responsive table {
        font-size: 0.875rem;
    }
    
    .table td, .table th {
        padding: 0.5rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 992px) {
    /* Stack buttons vertically on smaller screens */
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        margin-bottom: 0.25rem;
        border-radius: 0.25rem !important;
    }
    
    /* Hide less critical columns on tablets */
    .table thead th:nth-child(4),
    .table tbody td:nth-child(4),
    .table thead th:nth-child(5),
    .table tbody td:nth-child(5) {
        display: none;
    }
}

/* Mobile Responsive Clients List */
@media (max-width: 768px) {
    /* Card header adjustments */
    .card-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem;
    }
    
    .card-header h5 {
        font-size: 1.1rem;
    }
    
    .card-header .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Search form adjustments */
    .input-group {
        flex-wrap: wrap;
    }
    
    .input-group .form-control {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .input-group .btn {
        flex: 1;
        min-width: 100px;
    }
    
    /* Convert table to card layout on mobile */
    .table-responsive {
        border: none;
    }
    
    .table thead {
        display: none;
    }
    
    .table tbody {
        display: block;
    }
    
    .table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 1rem;
        background: white;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    .table tbody tr:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .table tbody td {
        display: block;
        text-align: left !important;
        padding: 0.5rem 0 !important;
        border: none !important;
    }
    
    /* Add labels before each cell */
    .table tbody td:nth-child(1)::before {
        content: "Name: ";
        font-weight: 600;
        color: var(--dark-color);
    }
    
    .table tbody td:nth-child(2)::before {
        content: "Email: ";
        font-weight: 600;
        color: var(--dark-color);
    }
    
    .table tbody td:nth-child(3)::before {
        content: "Phone: ";
        font-weight: 600;
        color: var(--dark-color);
    }
    
    .table tbody td:nth-child(4)::before {
        content: "Sex: ";
        font-weight: 600;
        color: var(--dark-color);
    }
    
    .table tbody td:nth-child(5)::before {
        content: "Age: ";
        font-weight: 600;
        color: var(--dark-color);
    }
    
    .table tbody td:nth-child(6)::before {
        content: "Active Card: ";
        font-weight: 600;
        color: var(--dark-color);
        display: block;
        margin-bottom: 0.25rem;
    }
    
    .table tbody td:nth-child(7)::before {
        content: "Actions: ";
        font-weight: 600;
        color: var(--dark-color);
        display: block;
        margin-bottom: 0.5rem;
    }
    
    /* Show all columns on mobile */
    .table thead th:nth-child(4),
    .table tbody td:nth-child(4),
    .table thead th:nth-child(5),
    .table tbody td:nth-child(5) {
        display: block !important;
    }
    
    /* Active card display on mobile */
    .table tbody td:nth-child(6) div {
        display: block !important;
        margin-top: 0.5rem;
    }
    
    .table tbody td:nth-child(6) .small {
        font-size: 0.875rem !important;
    }
    
    /* Actions buttons on mobile */
    .table tbody td:nth-child(7) .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .table tbody td:nth-child(7) .btn-group .btn {
        flex: 1;
        min-width: 45%;
        margin-bottom: 0;
    }
    
    .table tbody td:nth-child(7) .btn-group .btn-sm {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Pagination adjustments */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }
    
    .pagination .page-item {
        margin: 0.125rem;
    }
    
    .pagination .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Modal adjustments */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-header h5 {
        font-size: 1.1rem;
    }
    
    .modal-body .row .col-md-6 {
        margin-bottom: 0.75rem;
    }
}

/* Extra small mobile adjustments */
@media (max-width: 480px) {
    .card-body {
        padding: 0.75rem;
    }
    
    .table tbody tr {
        padding: 0.75rem;
    }
    
    .table tbody td {
        font-size: 0.875rem;
    }
    
    .table tbody td::before {
        font-size: 0.875rem;
    }
    
    .table tbody td:nth-child(7) .btn-group {
        flex-direction: column;
    }
    
    .table tbody td:nth-child(7) .btn-group .btn {
        width: 100%;
        min-width: 100%;
    }
    
    .pagination .page-link {
        padding: 0.375rem 0.625rem;
        font-size: 0.8rem;
    }
    
    .input-group .btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}
