/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --sidebar-width: 260px;
    --topbar-height: 70px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f3f4f6;
    color: #374151;
    line-height: 1.6;
}

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 100%;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 50px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.login-header h1 {
    font-size: 28px;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.login-header p {
    color: #6b7280;
    font-size: 14px;
}

.login-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: 500;
    font-size: 14px;
}

.form-group label i {
    margin-right: 5px;
    color: var(--primary-color);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-login i {
    margin-right: 8px;
}

.login-footer {
    text-align: center;
    color: #6b7280;
    font-size: 13px;
}

.login-footer p {
    margin: 8px 0;
}

.login-footer code {
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--primary-color);
}

.login-footer .hint {
    font-size: 12px;
    color: #9ca3af;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
    color: white;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 24px;
    font-weight: 700;
}

.sidebar-header i {
    margin-right: 10px;
    color: #fbbf24;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-left-color: var(--primary-color);
}

.nav-link.active {
    background: rgba(102, 126, 234, 0.1);
    color: white;
    border-left-color: var(--primary-color);
}

.nav-link i {
    width: 25px;
    margin-right: 12px;
    font-size: 18px;
}

.nav-link.logout {
    margin-top: 20px;
    color: #fca5a5;
}

.nav-link.logout:hover {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: var(--danger-color);
}

/* Main Content Styles */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* Topbar Styles */
.topbar {
    background: white;
    height: var(--topbar-height);
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.search-bar {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    padding: 10px 20px;
    border-radius: 25px;
    width: 350px;
}

.search-bar i {
    color: #9ca3af;
    margin-right: 10px;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 14px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.username {
    font-weight: 600;
    color: var(--dark-color);
}

.user-avatar i {
    font-size: 36px;
    color: var(--primary-color);
}

/* Messages */
.messages {
    padding: 20px 30px;
}

.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert i {
    font-size: 20px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--info-color);
}

.close-btn {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.close-btn:hover {
    opacity: 1;
}

/* Content Area */
.content {
    padding: 30px;
}

/* Page Header */
.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 32px;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.page-header h1 i {
    margin-right: 12px;
    color: var(--primary-color);
}

.page-header p {
    color: #6b7280;
    font-size: 16px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
}

.stat-details h3 {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.stat-details p {
    color: #6b7280;
    font-size: 14px;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 25px;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 20px;
    color: var(--dark-color);
    font-weight: 600;
}

.card-header h2 i {
    margin-right: 10px;
    color: var(--primary-color);
}

.card-body {
    padding: 25px;
}

/* Stat Items */
.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f3f4f6;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: #6b7280;
    font-size: 14px;
}

.stat-value {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 16px;
}

.stat-value.positive {
    color: var(--success-color);
}

.stat-value i {
    font-size: 10px;
    margin-right: 3px;
}

/* Action Buttons */
.action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 10px;
    text-decoration: none;
    color: var(--dark-color);
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.action-btn:last-child {
    margin-bottom: 0;
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

.action-btn i {
    font-size: 20px;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    font-size: 13px;
    color: #6b7280;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-color);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f9fafb;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-cell i {
    font-size: 24px;
    color: var(--primary-color);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-secondary {
    background: #f3f4f6;
    color: #6b7280;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 80px;
    color: #d1d5db;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 24px;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.empty-state p {
    color: #6b7280;
}

/* Profile Styles */
.profile-avatar {
    text-align: center;
    margin-bottom: 30px;
}

.profile-avatar i {
    font-size: 100px;
    color: var(--primary-color);
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    font-weight: 600;
    color: #6b7280;
}

.info-row .value {
    color: var(--dark-color);
}

/* Permissions List */
.permissions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.permission-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 10px;
    border-left: 3px solid #d1d5db;
}

.permission-item.active {
    background: #d1fae5;
    border-left-color: var(--success-color);
}

.permission-item i {
    font-size: 24px;
    color: #9ca3af;
}

.permission-item.active i {
    color: var(--success-color);
}

.permission-item strong {
    display: block;
    margin-bottom: 3px;
    color: var(--dark-color);
}

.permission-item p {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

/* Action Buttons in Profile */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #f3f4f6;
    color: var(--dark-color);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.btn-action:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-action.btn-danger {
    background: #fee2e2;
    color: #991b1b;
}

.btn-action.btn-danger:hover {
    background: var(--danger-color);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .search-bar {
        width: 200px;
    }
    
    .topbar {
        padding: 0 15px;
    }
    
    .content {
        padding: 15px;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }
}

/* Navigation Section Styles */
.nav-section {
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-section h3 {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    padding: 0 20px;
    font-weight: 600;
}

.nav-section .nav-link {
    padding-left: 30px;
    font-size: 14px;
}

.nav-section .nav-link i {
    width: 16px;
    margin-right: 12px;
}
