/* ===== تمام استایل‌ها ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.header .page-title p .icon-calendar {
    color: #78b9bd;
    margin-left: 6px;
}

/* ===== اسکرول بار سفارشی ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0a2e31;
}
::-webkit-scrollbar-thumb {
    background: #78b9bd;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5a9ea2;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #062022 0%, #0a2e31 50%, #0d3a3d 100%);
    color: #d4e6e7;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 30px rgba(6, 32, 34, 0.4);
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar .brand {
    text-align: center;
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(120, 185, 189, 0.12);
}
.sidebar .brand h2 {
    font-weight: 300;
    letter-spacing: 2px;
    font-size: 1.4rem;
    color: #d4e6e7;
}
.sidebar .brand h2 i {
    color: #ffaf7c;
    margin-left: 10px;
    font-size: 1.6rem;
    filter: drop-shadow(0 0 12px rgba(255, 175, 124, 0.25));
}

.sidebar .user-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    margin: 16px 16px 12px;
    background: rgba(120, 185, 189, 0.08);
    border-radius: 14px;
    border: 1px solid rgba(120, 185, 189, 0.10);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    cursor: pointer;
}
.sidebar .user-profile:hover {
    background: rgba(120, 185, 189, 0.15);
    border-color: rgba(120, 185, 189, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 32, 34, 0.4);
}
.sidebar .user-profile .avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffaf7c, #f0906a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(255, 175, 124, 0.3);
}
.sidebar .user-profile .user-info {
    flex: 1;
    min-width: 0;
}
.sidebar .user-profile .user-info .name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #d4e6e7;
    letter-spacing: 0.3px;
}
.sidebar .user-profile .user-info .role {
    font-size: 0.72rem;
    color: #8ab4b8;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.sidebar .user-profile .user-info .role i {
    font-size: 0.6rem;
    color: #78b9bd;
}

.sidebar .menu {
    flex: 1;
    padding: 8px 0;
    overflow-y: auto;
}
.sidebar .menu .menu-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    margin: 2px 12px;
    color: #8ab4b8;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.25s ease;
    border-right: 3px solid transparent;
    position: relative;
}
.sidebar .menu .menu-item i {
    width: 24px;
    margin-left: 12px;
    font-size: 1.1rem;
    transition: transform 0.2s ease;
    color: #78b9bd;
}
.sidebar .menu .menu-item span {
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.3px;
}
.sidebar .menu .menu-item:hover {
    background: rgba(120, 185, 189, 0.10);
    color: #d4e6e7;
    border-right-color: #ffaf7c;
    transform: translateX(-4px);
}
.sidebar .menu .menu-item:hover i {
    transform: scale(1.1);
    color: #ffaf7c;
}
.sidebar .menu .menu-item.active {
    background: rgba(255, 175, 124, 0.10);
    color: #d4e6e7;
    border-right-color: #ffaf7c;
    box-shadow: inset 0 0 30px rgba(255, 175, 124, 0.04);
}
.sidebar .menu .menu-item.active i {
    color: #ffaf7c;
}

.sidebar .footer {
    padding: 16px 24px;
    margin: 0 12px 12px;
    border-top: 1px solid rgba(120, 185, 189, 0.10);
    font-size: 0.85rem;
    color: #8ab4b8;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 10px;
}
.sidebar .footer:hover {
    color: #d4e6e7;
    background: rgba(120, 185, 189, 0.08);
    transform: translateX(-4px);
}
.sidebar .footer i {
    color: #ffaf7c;
    font-size: 1rem;
}

/* ===== MAIN WRAPPER ===== */
.main-wrapper {
    flex: 1;
    margin-right: 250px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== HEADER ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
    min-height: 76px;
}
.header .page-title {
    display: flex;
    flex-direction: column;
}
.header .page-title h1 {
    font-weight: 300;
    color: #0f172a;
    font-size: 1.6rem;
}
.header .page-title h1 span {
    font-weight: 600;
    background: linear-gradient(135deg, #ffaf7c, #f0906a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.header .page-title p {
    color: #64748b;
    font-size: 0.82rem;
    margin-top: 2px;
}
.header .page-title p .icon-calendar {
    color: #78b9bd;
    margin-left: 6px;
}

.header .user {
    display: flex;
    align-items: center;
    gap: 16px;
}
.header .user .name {
    font-weight: 500;
    color: #1e293b;
    font-size: 0.95rem;
}
.header .user .badge-online {
    background: #22c55e;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.8); }
}
.header .user .avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #78b9bd, #5a9ea2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 4px 14px rgba(120, 185, 189, 0.35);
    transition: transform 0.2s ease;
}
.header .user .avatar:hover {
    transform: scale(1.05);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    padding: 30px 40px 20px;
}

/* ===== CARDS ===== */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.stat-card {
    background: #fff;
    padding: 22px 24px;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(226, 232, 240, 0.5);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #ffaf7c, #78b9bd);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.07);
    border-color: rgba(120, 185, 189, 0.2);
}
.stat-card:hover::before {
    opacity: 1;
}
.stat-card .info h4 {
    font-weight: 400;
    color: #64748b;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.stat-card .info .number {
    font-size: 2.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 4px;
    letter-spacing: 0.5px;
}
.stat-card .icon {
    font-size: 2.6rem;
    color: #78b9bd;
    opacity: 0.6;
    transition: all 0.3s ease;
}
.stat-card:hover .icon {
    opacity: 1;
    transform: scale(1.08) rotate(-4deg);
    color: #ffaf7c;
}

/* ===== TABLES & PANELS ===== */
.panel {
    background: #fff;
    border-radius: 20px;
    padding: 28px 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(226, 232, 240, 0.5);
    margin-bottom: 30px;
    transition: box-shadow 0.3s ease;
}
.panel:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}
.panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 12px;
}
.panel .panel-header h3 {
    font-weight: 500;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}
.panel .panel-header h3 i {
    color: #ffaf7c;
    font-size: 1.2rem;
}
.panel .panel-header .btn {
    background: linear-gradient(135deg, #ffaf7c, #f0906a);
    border: none;
    color: #fff;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(255, 175, 124, 0.3);
}
.panel .panel-header .btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 175, 124, 0.4);
}
.panel .panel-header .btn:active {
    transform: scale(0.96);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
table th {
    text-align: right;
    padding: 14px 12px;
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}
table td {
    padding: 14px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    transition: background 0.15s ease;
}
table tr:hover td {
    background: #fafcff;
}
table td .user-icon {
    color: #78b9bd;
    margin-left: 8px;
}

/* ===== BADGE ===== */
.badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 30px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.badge.success { background: #dcfce7; color: #166534; }
.badge.warning { background: #fef9c3; color: #854d0e; }
.badge.danger { background: #fee2e2; color: #991b1b; }
.badge.info { background: #dbeafe; color: #1e40af; }

/* ===== ACTION ICONS ===== */
.action-icons i {
    margin: 0 5px;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.2s ease;
    font-size: 1rem;
    padding: 6px;
    border-radius: 8px;
}
.action-icons i:hover {
    color: #0f172a;
    background: rgba(0, 0, 0, 0.04);
}
.action-icons i.fa-trash:hover { color: #dc2626; background: rgba(220, 38, 38, 0.08); }
.action-icons i.fa-edit:hover { color: #78b9bd; background: rgba(120, 185, 189, 0.12); }
.action-icons i.fa-check-circle:hover { color: #22c55e; background: rgba(34, 197, 94, 0.1); }

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    gap: 6px;
    align-items: center;
}
.pagination .page-btn {
    background: #f1f5f9;
    border: none;
    padding: 6px 14px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #475569;
    font-size: 0.85rem;
}
.pagination .page-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.pagination .page-btn.active {
    background: #ffaf7c;
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 175, 124, 0.3);
}
.pagination .page-btn.active:hover {
    background: #f0906a;
}

/* ===== NOTIFICATIONS & QUICK ACTIONS ===== */
.notif-box,
.quick-box {
    flex: 1;
    min-width: 200px;
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid #e9edf2;
}
.notif-box .notif-title i,
.quick-box .quick-title i {
    color: #ffaf7c;
}
.quick-box .quick-title .icon-clock {
    color: #78b9bd;
}
.notif-box ul {
    list-style: none;
    margin-top: 12px;
}
.notif-box ul li {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}
.notif-box ul li:last-child {
    border-bottom: none;
}
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
.quick-actions .quick-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
}
.quick-actions .quick-btn:hover {
    background: #ffaf7c;
    color: #fff;
    border-color: #ffaf7c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 175, 124, 0.2);
}
.quick-actions .quick-btn i {
    font-size: 0.9rem;
}

/* ===== FOOTER ===== */
.footer-main {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    padding: 14px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    position: sticky;
    bottom: 0;
    z-index: 999;
    min-height: 56px;
}
.footer-main .footer-text {
    color: #94a3b8;
    font-size: 0.82rem;
}
.footer-main .footer-text i {
    color: #ffaf7c;
}
.footer-main .footer-links {
    display: flex;
    gap: 20px;
    align-items: center;
}
.footer-main .footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.82rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}
.footer-main .footer-links a:hover {
    color: #78b9bd;
}
.footer-main .footer-links .social-icons i {
    margin: 0 5px;
    color: #94a3b8;
    font-size: 1rem;
    transition: all 0.25s ease;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
}
.footer-main .footer-links .social-icons i:hover {
    color: #ffaf7c;
    background: rgba(255, 175, 124, 0.08);
    transform: translateY(-2px);
}

/* ===== NOTIFICATION BOX LAYOUT ===== */
.dashboard-bottom {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    .sidebar .brand h2 span,
    .sidebar .user-profile .user-info,
    .sidebar .menu .menu-item span,
    .sidebar .footer span { display: none; }
    .sidebar .brand h2 { font-size: 1.2rem; }
    .sidebar .brand h2 i { margin-left: 0; }
    .sidebar .user-profile {
        padding: 10px;
        margin: 8px 10px;
        justify-content: center;
        border-radius: 12px;
    }
    .sidebar .user-profile .avatar { width: 38px; height: 38px; font-size: 0.9rem; }
    .sidebar .menu .menu-item {
        justify-content: center;
        padding: 14px 0;
        margin: 2px 6px;
        border-radius: 10px;
    }
    .sidebar .menu .menu-item i { margin: 0; font-size: 1.2rem; }
    .sidebar .footer {
        justify-content: center;
        padding: 14px 0;
        margin: 0 6px 8px;
        border-radius: 10px;
    }
    .sidebar .footer i { font-size: 1.2rem; }
    
    .main-wrapper {
        margin-right: 70px;
    }
    .header {
        padding: 12px 20px;
        min-height: 64px;
    }
    .header .page-title h1 { font-size: 1.2rem; }
    .main-content { padding: 16px 16px 12px; }
    .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
    .panel { padding: 18px 16px; }
    .footer-main {
        padding: 12px 20px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    .footer-main .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    .dashboard-bottom {
        flex-direction: column;
    }
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
}
@media (max-width: 480px) {
    .stats { grid-template-columns: 1fr; }
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 16px;
    }
    .header .user {
        width: 100%;
        justify-content: flex-start;
    }
    .panel { padding: 14px 12px; }
    .panel .panel-header {
        flex-direction: column;
        align-items: stretch;
    }
    .panel .panel-header .btn { justify-content: center; }
    table { font-size: 0.8rem; }
    table th, table td { padding: 10px 6px; }
    .badge { font-size: 0.65rem; padding: 2px 10px; }
    .action-icons i { padding: 4px; font-size: 0.85rem; }
    .pagination .page-btn { padding: 4px 10px; font-size: 0.75rem; }
}
/* دکمه ذخیره در فوتر */
.footer-save-icon {
    color: #ffaf7c;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
    padding: 4px 8px;
    border-radius: 8px;
}
.footer-save-icon:hover {
    color: #f0906a;
    transform: scale(1.15);
    background: rgba(255, 175, 124, 0.1);
}