* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
}

/* Prevent any element from causing horizontal scroll */
.dashboard-container,
.main-content,
.content-area,
.page-header,
.card,
.table-container {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Login Page Styles */
.login-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 450px;
    margin: 50px auto;
    padding: 40px;
}

.login-card h1 {
    color: #667eea;
    text-align: center;
    margin-bottom: 10px;
    font-size: 2em;
}

.login-card h2 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-primary {
    background: #667eea;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #c33;
}

.success-message {
    background: #efe;
    color: #3c3;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #3c3;
}

.demo-credentials {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.demo-credentials h3 {
    color: #667eea;
    font-size: 1.1em;
    margin-bottom: 15px;
}

.demo-credentials p {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 8px;
}

/* Navbar Styles */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar h1 {
    color: #667eea;
    font-size: 1.5em;
}

.nav-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

#user-info {
    color: #555;
    font-weight: 500;
}

/* Home Page Styles */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 60px);
}

.sidebar {
    width: 250px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    height: calc(100vh - 60px);
    overflow-y: auto;
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    color: #555;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-item:hover {
    background: #f5f5f5;
    color: #667eea;
    border-left-color: #667eea;
}

.sidebar-item.active {
    background: #f0f0ff;
    color: #667eea;
    border-left-color: #667eea;
    font-weight: 600;
}

.sidebar-item .icon {
    font-size: 20px;
}

.sidebar-item.logout-item {
    color: #dc3545;
    margin-top: 20px;
    border-top: 1px solid #f0f0f0;
    padding-top: 25px;
}

.sidebar-item.logout-item:hover {
    background: #fee;
    border-left-color: #dc3545;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 30px;
    background: #f5f5f5;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.home-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

.home-content h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 2em;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.card h2 {
    color: #333;
    margin-bottom: 20px;
}

.card h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.card-header h3 {
    margin: 0;
}

#profile-info p {
    color: #555;
    margin-bottom: 8px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    max-width: 100%;
    overflow-x: hidden;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.stat-card h3 {
    color: white;
    font-size: 0.9em;
    margin-bottom: 10px;
    opacity: 0.9;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    margin: 0;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f9f9f9;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.data-table th {
    font-weight: 600;
    color: #667eea;
}

.data-table tr:hover {
    background: #f5f5ff;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s;
}

.btn-icon:hover {
    transform: scale(1.2);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-inactive {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-admin {
    background: #667eea;
    color: white;
}

.badge-super {
    background: #764ba2;
    color: white;
}

.badge-platinum {
    background: #ffd700;
    color: #333;
}

.badge-subscriber {
    background: #6c757d;
    color: white;
}

.badge-primary {
    background: #667eea;
    color: white;
}

.badge-info {
    background: #17a2b8;
    color: white;
}

.badge-danger {
    background: #dc3545;
    color: white;
}

.badge-secondary {
    background: #6c757d;
    color: white;
}

/* Logs Table Styles */
.logs-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.logs-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.logs-table thead th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.logs-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s;
}

.logs-table tbody tr:hover {
    background-color: #f8f9fa;
}

.logs-table tbody td {
    padding: 12px 15px;
}

.table-container {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 100%;
}

.logs-table {
    min-width: 800px;
}

/* Button size variants */
.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

/* Groups Grid */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.group-card {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #667eea;
    transition: transform 0.3s;
}

.group-card.inactive-card {
    opacity: 0.6;
    background: #f5f5f5;
    border-left-color: #999;
}

.group-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.group-header h4 {
    color: #667eea;
    margin: 0;
}

.member-count {
    font-size: 0.85em;
    color: #666;
}

.group-card p {
    color: #666;
    margin-bottom: 15px;
}

.group-actions {
    display: flex;
    gap: 10px;
}

/* Sub User Styles */
.subuser-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.subuser-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    transition: all 0.3s;
}

.subuser-item:hover {
    background: #f0f0ff;
}

.subuser-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
}

.subuser-info {
    flex: 1;
}

.subuser-info h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.subuser-info p {
    margin: 0 0 5px 0;
    color: #666;
    font-size: 0.9em;
}

.subuser-permissions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.permission-badge {
    background: #e0e7ff;
    color: #667eea;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
}

.subuser-actions {
    display: flex;
    gap: 8px;
}

/* Owner Tab Styles */
.owner-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.owner-stat-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: white;
}

.owner-stat-label {
    font-size: 0.9em;
    opacity: 0.9;
}

.owner-stat-value {
    font-size: 2em;
    font-weight: bold;
}

.owner-stat-change {
    font-size: 0.85em;
    padding: 4px 8px;
    border-radius: 4px;
    align-self: flex-start;
}

.owner-stat-change.positive {
    background: rgba(76, 175, 80, 0.3);
}

.owner-stat-change.negative {
    background: rgba(244, 67, 54, 0.3);
}

.owner-stat-change.neutral {
    background: rgba(255, 255, 255, 0.2);
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.setting-item {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    color: #333;
}

.setting-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.setting-description {
    margin: 8px 0 0 28px;
    color: #666;
    font-size: 0.9em;
}

/* Activity Log */
.activity-log {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.activity-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #e0e0e0;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    flex-shrink: 0;
}

.activity-icon.success {
    background: #d4edda;
    color: #155724;
}

.activity-icon.warning {
    background: #fff3cd;
    color: #856404;
}

.activity-icon.error {
    background: #f8d7da;
    color: #721c24;
}

.activity-icon.info {
    background: #d1ecf1;
    color: #0c5460;
}

.activity-details {
    flex: 1;
}

.activity-details h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1em;
}

.activity-details p {
    margin: 0 0 8px 0;
    color: #666;
    font-size: 0.9em;
}

.activity-time {
    color: #999;
    font-size: 0.85em;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9em;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.action-icon {
    font-size: 2em;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
    max-width: 100%;
    overflow-x: hidden;
}

.feature-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card h3 {
    color: white;
    margin-bottom: 10px;
}

.feature-card p {
    margin-bottom: 15px;
    opacity: 0.9;
}

.feature-card .btn {
    background: white;
    color: #667eea;
}

.feature-card .btn:hover {
    background: #f0f0f0;
}

.feature-content {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    display: none;
}

.feature-content.show {
    display: block;
}

/* Landing Page Styles */
.landing-hero {
    text-align: center;
    padding: 60px 20px;
}

.landing-hero h1 {
    color: white;
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.landing-hero p {
    color: white;
    font-size: 1.3em;
    margin-bottom: 40px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.landing-card {
    background: white;
    border-radius: 10px;
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-item {
    text-align: center;
    padding: 20px;
}

.feature-item h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.feature-item p {
    color: #666;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.cta-buttons .btn {
    width: auto;
    min-width: 150px;
}

/* Responsive */
/* Tablet and medium screens */
@media (max-width: 1024px) {
    .nav-container {
        padding: 15px;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .groups-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile landscape and small tablets */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 15px;
    }
    
    /* Login page responsive */
    .login-card {
        margin: 20px auto;
        padding: 25px;
        max-width: 100%;
    }
    
    .login-card h1 {
        font-size: 1.5em;
    }
    
    .login-card h2 {
        font-size: 1.2em;
    }
    
    .demo-credentials {
        font-size: 0.9em;
    }
    
    /* Landing page responsive */
    .landing-hero {
        padding: 40px 15px;
    }
    
    .landing-hero h1 {
        font-size: 2em;
    }
    
    .landing-hero p {
        font-size: 1.1em;
    }
    
    .landing-card {
        padding: 25px;
    }
    
    .features-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
    
    /* Navbar responsive */
    .navbar {
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        padding: 12px 15px;
    }
    
    .navbar h1 {
        font-size: 1.2em;
    }
    
    .nav-menu {
        gap: 10px;
    }
    
    #user-info {
        font-size: 0.85em;
    }
    
    /* Dashboard sidebar responsive */
    .sidebar {
        width: 70px;
        transition: width 0.3s;
    }
    
    .sidebar-item span:not(.icon) {
        display: none;
    }
    
    .sidebar-item {
        justify-content: center;
        padding: 15px 10px;
        gap: 0;
    }
    
    .sidebar-item .icon {
        font-size: 24px;
    }
    
    .main-content {
        margin-left: 70px;
        padding: 15px;
    }
    
    /* Home content responsive */
    .home-content {
        padding: 20px;
        margin-top: 15px;
    }
    
    .home-content h2 {
        font-size: 1.5em;
    }
    
    /* Stats grid responsive */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 2em;
    }
    
    /* Features grid responsive */
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    /* Card responsive */
    .card {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .card-header .btn {
        width: 100%;
    }
    
    /* Table responsive */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table {
        font-size: 0.85em;
        min-width: 600px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }
    
    /* Groups grid responsive */
    .groups-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        width: 100%;
        max-width: 100%;
    }
    
    .group-card {
        padding: 15px;
    }
    
    /* Sub user responsive */
    .subuser-item {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .subuser-info {
        flex: 1 1 100%;
        order: 1;
    }
    
    .subuser-avatar {
        order: 0;
    }
    
    .subuser-permissions {
        order: 2;
        flex: 1 1 100%;
    }
    
    .subuser-actions {
        order: 3;
        width: 100%;
        justify-content: flex-end;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    body {
        font-size: 13px;
    }
    
    /* Login page mobile */
    .login-card {
        margin: 10px;
        padding: 20px;
    }
    
    .login-card h1 {
        font-size: 1.3em;
    }
    
    .form-group input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .demo-credentials p {
        font-size: 0.85em;
    }
    
    /* Landing page mobile */
    .landing-hero h1 {
        font-size: 1.5em;
    }
    
    .landing-hero p {
        font-size: 1em;
    }
    
    .landing-card {
        padding: 20px 15px;
    }
    
    /* Navbar mobile */
    .navbar h1 {
        font-size: 1em;
    }
    
    .nav-container {
        padding: 10px;
        gap: 10px;
    }
    
    .nav-menu {
        flex-direction: column;
        align-items: flex-end;
        gap: 5px;
    }
    
    #user-info {
        font-size: 0.75em;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .btn-secondary {
        padding: 6px 12px;
        font-size: 0.85em;
    }
    
    /* Dashboard mobile - horizontal scrolling sidebar */
    .dashboard-layout {
        flex-direction: column !important;
    }
    
    .sidebar {
        width: 100% !important;
        height: auto !important;
        position: static !important;
        display: flex !important;
        border-bottom: 1px solid #e0e0e0;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .sidebar-menu {
        display: flex !important;
        flex-direction: row !important;
        width: 100%;
        padding: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .sidebar-item {
        flex-direction: column !important;
        gap: 5px;
        padding: 12px 15px;
        border-left: none !important;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
        min-width: 80px;
        text-align: center;
        flex-shrink: 0;
        justify-content: center;
    }
    
    .sidebar-item span:not(.icon) {
        display: block !important;
        font-size: 0.75em;
    }
    
    .sidebar-item .icon {
        font-size: 20px !important;
    }
    
    .sidebar-item:hover,
    .sidebar-item.active {
        border-left: none !important;
        border-bottom-color: #667eea;
    }
    
    .sidebar-item.logout-item {
        border-top: none;
        padding-top: 12px;
        margin-top: 0;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 10px;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Stats grid mobile */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-card h3 {
        font-size: 0.85em;
    }
    
    .stat-number {
        font-size: 1.8em;
    }
    
    /* Card mobile */
    .card {
        padding: 12px;
        border-radius: 6px;
    }
    
    .card h2 {
        font-size: 1.3em;
    }
    
    .card h3 {
        font-size: 1.1em;
    }
    
    /* Table mobile */
    .data-table {
        font-size: 0.75em;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 5px;
    }
    
    .btn-icon {
        font-size: 16px;
    }
    
    /* Groups mobile */
    .group-card {
        padding: 12px;
    }
    
    .group-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .group-actions {
        width: 100%;
    }
    
    .group-actions .btn {
        flex: 1;
    }
    
    /* Sub user mobile */
    .subuser-item {
        padding: 15px 10px;
        gap: 10px;
    }
    
    .subuser-avatar {
        width: 40px;
        height: 40px;
        font-size: 1em;
    }
    
    .subuser-info h4 {
        font-size: 0.95em;
    }
    
    .subuser-actions .btn {
        padding: 6px 10px;
        font-size: 0.8em;
    }
    
    /* Buttons mobile */
    .btn {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .btn-sm {
        padding: 6px 12px;
        font-size: 0.8em;
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        width: 60px;
    }
    
    .main-content {
        margin-left: 60px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large desktop */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
    
    .nav-container {
        max-width: 1400px;
    }
    
    .main-content {
        max-width: calc(1400px - 250px);
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .groups-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    margin: auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 540px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.05);
    animation: slideDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: none;
}

.modal-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.5em;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.modal-close {
    color: rgba(255, 255, 255, 0.9);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.modal-close:hover,
.modal-close:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 32px;
    background: white;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #2d3748;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.01em;
}

.form-group label::after {
    content: '*';
    color: #e53e3e;
    margin-left: 4px;
    font-size: 14px;
}

.form-control,
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f7fafc;
    color: #2d3748;
    font-family: inherit;
}

.form-control:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 1px 3px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a5568' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-text {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #718096;
    font-style: italic;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 28px 32px;
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
}

.form-actions button {
    padding: 12px 24px;
    font-weight: 600;
    font-size: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.form-actions .btn-secondary {
    background: white;
    color: #4a5568;
    border: 2px solid #cbd5e0;
}

.form-actions .btn-secondary:hover {
    background: #f7fafc;
    border-color: #a0aec0;
    transform: translateY(-1px);
}

.form-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.form-actions .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
}

.success-message {
    text-align: center;
}

.success-message p {
    margin-bottom: 15px;
    color: #333;
}

.success-message strong {
    color: #667eea;
}

.invite-link-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.invite-link-container input,
.invite-link-container textarea {
    flex: 1;
    min-height: 50px;
}

.invite-link-container button {
    white-space: nowrap;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-80px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .modal-header {
        padding: 20px 24px;
    }
    
    .modal-header h3 {
        font-size: 1.3em;
    }
    
    .modal-body {
        padding: 24px;
    }
    
    .form-actions {
        flex-direction: column;
        padding: 20px 24px;
    }
    
    .form-actions button {
        width: 100%;
    }
    
    .invite-link-container {
        flex-direction: column;
    }
}

/* Notification System */
.notification-container,
#notificationContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.notification {
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    border-left: 4px solid #667eea;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease-out;
}

.notification.notification-show {
    transform: translateX(0);
    opacity: 1;
}

.notification.success {
    border-left-color: #10b981;
}

.notification.error {
    border-left-color: #ef4444;
}

.notification.warning {
    border-left-color: #f59e0b;
}

.notification.info {
    border-left-color: #3b82f6;
}

.notification-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.notification.success .notification-icon {
    color: #10b981;
}

.notification.error .notification-icon {
    color: #ef4444;
}

.notification.warning .notification-icon {
    color: #f59e0b;
}

.notification.info .notification-icon {
    color: #3b82f6;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
}

.notification-message {
    font-size: 14px;
    color: #6b7280;
}

.notification-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.notification-close:hover {
    background: #f3f4f6;
    color: #4b5563;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.notification.removing {
    animation: slideOut 0.3s ease-out forwards;
}

/* Dashboard Container (New) */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background: #f5f5f5;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
}

.dashboard-container .sidebar {
    width: 250px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
}

.sidebar-header h2 {
    color: #667eea;
    margin: 0 0 10px 0;
    font-size: 1.5em;
}

.user-role-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    color: #555;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: #f5f5f5;
    color: #667eea;
    border-left-color: #667eea;
}

.nav-item.active {
    background: #f0f0ff;
    color: #667eea;
    border-left-color: #667eea;
    font-weight: 600;
}

.nav-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

.dashboard-container .main-content {
    flex: 1;
    margin-left: 250px;
    padding: 0;
    width: calc(100% - 250px);
    max-width: calc(100% - 250px);
    overflow-x: hidden;
}

.mobile-menu-toggle {
    display: none;
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.3s;
    line-height: 1;
}

.mobile-menu-toggle:hover {
    background: #5568d3;
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

.page-header {
    background: white;
    padding: 25px 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    overflow-x: hidden;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.page-header h1 {
    color: #333;
    margin: 0;
    font-size: 1.8em;
}

.user-info {
    color: #666;
    font-size: 0.95em;
}

.content-area {
    padding: 32px;
    max-width: 100%;
    overflow-x: hidden;
}

/* Responsive Dashboard */
@media (max-width: 768px) {
    .dashboard-container .sidebar {
        width: 70px;
    }
    
    .sidebar-header h2 {
        font-size: 1.2em;
    }
    
    .user-role-badge,
    .nav-item span:not(.nav-icon) {
        display: none;
    }
    
    .nav-item {
        justify-content: center;
        padding: 15px 10px;
    }
    
    .nav-icon {
        font-size: 24px;
    }
    
    .dashboard-container .main-content {
        margin-left: 70px;
        width: calc(100% - 70px);
        max-width: calc(100% - 70px);
    }
    
    .page-header {
        padding: 20px 15px;
    }
    
    .page-header h1 {
        font-size: 1.4em;
    }
    
    .content-area {
        padding: 15px;
    }
    
    .filter-controls > div {
        display: flex;
        flex-wrap: wrap;
        gap: 10px !important;
    }
    
    .filter-controls label {
        display: block;
        width: 100%;
        margin-bottom: 5px;
    }
    
    .filter-controls select,
    .filter-controls input[type="date"] {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .table-container {
        margin: 0 -15px;
        width: calc(100% + 30px);
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    .mobile-menu-toggle {
        display: block !important;
    }
    
    .dashboard-container {
        flex-direction: column;
    }
    
    .dashboard-container .sidebar {
        width: 100% !important;
        height: auto !important;
        position: fixed !important;
        top: 0;
        left: 0;
        z-index: 1000;
        flex-direction: column !important;
        overflow-x: hidden;
        overflow-y: auto;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        -webkit-overflow-scrolling: touch;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        max-height: 100vh;
    }
    
    .dashboard-container .sidebar.show {
        transform: translateX(0);
    }
    
    .sidebar-header {
        padding: 25px 20px;
        border-bottom: 1px solid #e0e0e0;
        border-right: none;
        flex-shrink: 0;
        text-align: center;
    }
    
    .sidebar-header h2 {
        font-size: 1.5em !important;
        margin: 0 0 10px 0;
    }
    
    .user-role-badge {
        display: inline-block !important;
        font-size: 0.7em;
    }
    
    .sidebar-nav {
        display: flex !important;
        flex-direction: column !important;
        padding: 20px 0;
        overflow-x: hidden;
        flex: 1;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-item {
        flex-direction: row !important;
        gap: 12px;
        padding: 15px 25px;
        border-left: 3px solid transparent !important;
        border-bottom: none;
        white-space: nowrap;
        justify-content: flex-start !important;
        flex-shrink: 0;
        min-width: auto;
    }
    
    .nav-item span:not(.nav-icon) {
        display: block !important;
        font-size: 0.75em;
    }
    
    .nav-icon {
        font-size: 20px !important;
        width: auto !important;
    }
    
    .nav-item:hover,
    .nav-item.active {
        border-left-color: #667eea !important;
        border-bottom: none;
        background: #f0f0ff;
    }
    
    .sidebar-footer {
        padding: 20px;
        border-top: 1px solid #e0e0e0;
        border-left: none;
        flex-shrink: 0;
    }
    
    .dashboard-container .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .content-area {
        padding: 12px;
    }
    
    .page-header {
        padding: 15px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .page-header h1 {
        font-size: 1.3em;
    }
    
    .filter-controls {
        margin: 0 !important;
    }
    
    .filter-controls > div {
        display: flex;
        flex-direction: column;
        gap: 8px !important;
        width: 100%;
    }
    
    .filter-controls > div > div {
        width: 100%;
    }
    
    .filter-controls label {
        display: block;
        width: 100%;
        margin: 0 0 5px 0 !important;
        font-size: 0.9em;
    }
    
    .filter-controls select,
    .filter-controls input[type="date"],
    .filter-controls .form-control {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
    }
    
    .filter-controls button {
        width: 100%;
        margin: 10px 0 0 0 !important;
    }
    
    .table-container {
        margin: 0 -12px;
        width: calc(100% + 24px);
        border-radius: 0;
    }
    
    .logs-table {
        font-size: 0.85em;
    }
    
    .logs-table thead th,
    .logs-table tbody td {
        padding: 10px 8px;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
        justify-content: center;
    }
    
    .pagination button {
        min-width: 35px;
        padding: 8px 10px;
        font-size: 0.85em;
    }
}

/* Groups Grid */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.group-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.group-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.group-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #2d3748;
}

.group-info {
    margin-bottom: 15px;
}

.group-info p {
    margin: 8px 0;
    font-size: 0.9em;
    color: #4b5563;
}

.group-info p strong {
    color: #2d3748;
    font-weight: 600;
}

.group-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Table Styles */
.table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f7fafc;
    border-bottom: 2px solid #e2e8f0;
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #4b5563;
}

.data-table tbody tr:hover {
    background: #f7fafc;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Users Grid - Card Design */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    padding: 0;
}

.user-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.user-card-checkbox {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
}

.user-card-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.user-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.user-card.expired-card::before {
    background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
}

.user-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

.user-card.expired-card {
    background: #fff5f5;
    border-color: #feb2b2;
}

.user-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    position: relative;
}

.user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.expired-card .user-avatar {
    background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
    box-shadow: 0 4px 12px rgba(252, 129, 129, 0.3);
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-id {
    margin: 0;
    font-size: 13px;
    color: #718096;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-card-header .badge {
    position: absolute;
    top: 0;
    right: 0;
}

.user-card-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
    padding: 16px;
    background: #f7fafc;
    border-radius: 12px;
}

.user-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    font-size: 13px;
    color: #718096;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-value {
    font-size: 14px;
    color: #2d3748;
    font-weight: 600;
    text-align: right;
}

.user-card-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.user-card-actions .btn {
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}

.user-card-actions .btn span {
    font-size: 14px;
}

.user-card-actions .btn-edit {
    background: #667eea;
    color: white;
    border: none;
}

.user-card-actions .btn-edit:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.user-card-actions .btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.user-card-actions .btn-success:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

/* Responsive Design for Users Grid */
@media (max-width: 1200px) {
    .users-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .users-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .user-card {
        padding: 20px;
    }
    
    .user-avatar {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .user-name {
        font-size: 16px;
    }
    
    .user-card-actions {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .user-card-actions .btn {
        width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .users-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1400px) {
    .users-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Pagination Styles - Outlined Modern */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
    padding: 20px 0;
    flex-wrap: wrap;
}

.pagination button {
    min-width: 42px;
    height: 42px;
    padding: 10px 14px;
    border: 2px solid #d1d5db;
    background: transparent;
    color: #6b7280;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination button:hover:not(:disabled) {
    background: transparent;
    border-color: #667eea;
    color: #667eea;
    transform: scale(1.05);
}

.pagination button.btn-primary {
    background: transparent;
    color: #667eea;
    border-color: #667eea;
    border-width: 2px;
    font-weight: 700;
}

.pagination button.btn-primary:hover {
    background: #667eea;
    color: white;
    transform: scale(1.08);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #e5e7eb;
}

.pagination span:not(.pagination-info) {
    color: #9ca3af;
    padding: 0 6px;
    font-weight: 700;
    font-size: 16px;
}

.pagination-info {
    margin-left: 16px;
    padding: 10px 18px;
    background: transparent;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .groups-grid {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 600px;
    }
    
    .pagination {
        gap: 4px;
    }
    
    .pagination button {
        min-width: 36px;
        height: 36px;
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .pagination-info {
        width: 100%;
        text-align: center;
        margin-left: 0;
        margin-top: 8px;
    }
}

/* Selection controls */
.selection-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f7fafc;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    color: #2d3748;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

/* Bulk actions modal */
.bulk-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.bulk-action-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.bulk-action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.bulk-action-card.warning-card {
    border-color: #f6ad55;
}

.bulk-action-card.warning-card:hover {
    background: #fffaf0;
    border-color: #ed8936;
}

.bulk-action-card.danger-card {
    border-color: #fc8181;
}

.bulk-action-card.danger-card:hover {
    background: #fff5f5;
    border-color: #f56565;
}

.bulk-action-card.primary-card {
    border-color: #667eea;
}

.bulk-action-card.primary-card:hover {
    background: #f0f4ff;
    border-color: #5568d3;
}

.bulk-icon {
    font-size: 2.5em;
}

.bulk-action-card h3 {
    margin: 0;
    font-size: 1.1em;
    color: #2d3748;
}

.bulk-action-card p {
    margin: 0;
    font-size: 0.85em;
    color: #718096;
}

/* Filter controls */
.filter-controls {
    display: flex;
    gap: 20px;
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 500;
    color: #2d3748;
    font-size: 0.9em;
}

.filter-select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.filter-select:hover {
    border-color: #cbd5e0;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Terminated card styling */
.user-card.terminated-card {
    background: #f7fafc;
    border-color: #cbd5e0;
    opacity: 0.85;
}

.user-card.terminated-card::before {
    background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
}

/* Info button style */
.btn-info {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.btn-sm.btn-info {
    padding: 6px 12px;
}

/* Header actions layout */
.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .filter-controls {
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-group {
        width: 100%;
        justify-content: space-between;
    }
    
    .filter-select {
        flex: 1;
        min-width: 150px;
    }
}

