/* Admin Panel Specific Styles */
body.admin-body {
    background-color: var(--bg);
}

.admin-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.admin-login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    padding: 40px;
}

.admin-logo-wrap {
    text-align: center;
    margin-bottom: 32px;
}

.admin-logo-wrap .logo {
    justify-content: center;
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 8px;
}

.admin-logo-wrap p {
    color: var(--text-muted);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.admin-wrapper {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Admin Sidebar */
.admin-sidebar {
    width: 260px;
    background: var(--primary-dark);
    color: var(--white);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: var(--transition);
}

.admin-sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar-header .logo { color: var(--white); }

.admin-nav {
    flex: 1;
    overflow-y: auto;
    padding: 24px 0;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: var(--transition);
}

.admin-nav-item i {
    width: 20px;
    font-size: 18px;
    text-align: center;
}

.admin-nav-item:hover, .admin-nav-item.active {
    background: rgba(255,255,255,0.05);
    color: var(--white);
    border-left-color: var(--accent);
}

.admin-sidebar-footer {
    padding: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--accent);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.admin-user-details { overflow: hidden; }

.admin-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.admin-user-role {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

/* Admin Main */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
}

.admin-header {
    height: var(--header-height);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    flex-shrink: 0;
}

.admin-page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-content-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

/* Stats */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.admin-stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.admin-stat-icon.primary { background: rgba(27, 42, 74, 0.1); color: var(--primary); }
.admin-stat-icon.success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.admin-stat-icon.warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.admin-stat-icon.accent { background: rgba(200, 90, 26, 0.1); color: var(--accent); }

.admin-stat-details h3 {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
}

.admin-stat-details .value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
}

/* Tables */
.admin-panel-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 32px;
}

.admin-panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-panel-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, .admin-table td {
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-sidebar);
}

.admin-table td {
    font-size: 14px;
    color: var(--text);
}

.admin-table tr:last-child td { border-bottom: none; }

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.status-badge.completed { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.status-badge.pending { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.status-badge.processing { background: rgba(27, 42, 74, 0.1); color: var(--primary); }
.status-badge.shipped { background: rgba(59, 130, 246, 0.1); color: #3B82F6; }
.status-badge.cancelled { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

/* ===== NOTIFICATION SYSTEM ===== */
.notif-wrapper {
    position: relative;
}

.notif-bell {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: var(--primary);
    transition: var(--transition);
}

.notif-bell:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--white);
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 9999;
    display: none;
    overflow: hidden;
}

.notif-dropdown.active { display: block; }

.notif-dropdown-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
}

.notif-dropdown-header span {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}

.notif-mark-all {
    font-size: 12px;
    color: var(--accent);
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.notif-mark-all:hover {
    background: var(--accent-light);
}

.notif-dropdown-body {
    max-height: 380px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
}

.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: #f8faff; }

.notif-item-unread {
    background: #f0f4ff;
}

.notif-item-unread:hover { background: #e8eeff; }

.notif-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.notif-item-content { flex: 1; min-width: 0; }

.notif-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
}

.notif-item-msg {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-item-time {
    font-size: 11px;
    color: var(--text-muted);
}

.notif-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    margin-top: 4px;
}

.notif-dropdown-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    text-align: center;
    background: var(--bg);
}

.notif-dropdown-footer a {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.notif-dropdown-footer a:hover { text-decoration: underline; }

.notif-loading, .notif-empty {
    padding: 32px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.notif-empty i {
    font-size: 32px;
    margin-bottom: 8px;
    display: block;
    color: var(--border);
}