@font-face {
    font-family: vazir;
    src: url(sans.ttf);
}

:root {
    --primary-color: #1976d2;
    --primary-dark: #1565c0;
    --primary-light: #42a5f5;
    --secondary-color: #424242;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --info-color: #00bcd4;
    --background: #f5f5f5;
    --surface: #ffffff;
    --text-primary: #212121;
    --text-secondary: #757575;
    --border-color: #e0e0e0;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
    --sidebar-width: 260px;
    --topnav-height: 64px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: vazir;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Sidebar */
.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--primary-color);
    color: white;
}

.sidebar-menu {
    list-style: none;
    padding: 16px 0;
}

.menu-item {
    margin: 4px 12px;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
}

.menu-item a:hover {
    background: var(--background);
}

.menu-item.active a {
    background: var(--primary-light);
    color: white;
}

.menu-item i {
    font-size: 20px;
    width: 24px;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Main Content */
.main-content {
    margin-right: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

/* حالت پنهان شدن کامل در دسکتاپ */
.sidebar.hidden-sidebar {
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
}

/* وقتی سایدبار پنهان شد، محتوا تمام عرض بشه */
.main-content.fullwidth {
    margin-right: 0;
}


/* Top Navigation */
.top-nav {
    position: sticky;
    top: 0;
    height: var(--topnav-height);
    background: var(--surface);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
}

.hamburger-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.hamburger-btn:hover {
    background: var(--background);
}

.hamburger-btn i {
    font-size: 24px;
    color: var(--text-primary);
}

.nav-title {
    font-size: 20px;
    font-weight: 600;
    flex: 1;
    margin-right: 16px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--background);
}

.icon-btn i {
    font-size: 20px;
    color: var(--text-primary);
}

.icon-btn .badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: var(--danger-color);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--primary-color);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content Wrapper */
.content-wrapper {
    padding: 24px;
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: none;
    overflow: hidden;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--surface);
}

.card-body {
    padding: 20px;
}

/* Stat Cards */
.stat-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-card-primary .stat-icon {
    background: var(--primary-color);
}

.stat-card-success .stat-icon {
    background: var(--success-color);
}

.stat-card-warning .stat-icon {
    background: var(--warning-color);
}

.stat-card-info .stat-icon {
    background: var(--info-color);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Table */
.table {
    margin-bottom: 0;
}

.table thead th {
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 12px;
}

.table tbody td {
    padding: 12px;
    vertical-align: middle;
}

/* Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timeline-item {
    display: flex;
    gap: 16px;
    position: relative;
}

.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 48px;
    top: 32px;
    width: 2px;
    height: calc(100% + 8px);
    background: var(--border-color);
}

.timeline-time {
    width: 60px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
    padding: 12px;
    background: var(--background);
    border-radius: 8px;
}

.timeline-content h6 {
    margin-bottom: 4px;
    font-size: 16px;
}

/* Schedule Cards */
.schedule-card {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.schedule-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.schedule-card-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.schedule-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.schedule-card-body {
    padding: 20px;
}

.schedule-card-body h5 {
    margin-bottom: 8px;
    font-size: 18px;
}

.schedule-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.meta-item i {
    font-size: 16px;
}

.schedule-card-footer {
    padding: 16px 20px;
    background: var(--background);
    text-align: left;
}

/* Profile */
.profile-avatar-large {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
}

.avatar-edit-btn {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: 3px solid var(--surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.avatar-edit-btn:hover {
    background: var(--primary-dark);
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.profile-stats .stat-item {
    text-align: center;
}

.profile-stats .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.profile-stats .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.contact-item i {
    font-size: 20px;
    color: var(--primary-color);
    margin-top: 2px;
}

.contact-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.contact-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.setting-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.setting-description {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Form Controls */
.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 16px;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline-primary {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline-secondary {
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--background);
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

/* Pagination */
.pagination {
    gap: 8px;
}

.page-link {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 8px 16px;
}

.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Responsive */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 16px;
    }

    .top-nav {
        padding: 0 16px;
    }

    .nav-title {
        font-size: 18px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .stat-value {
        font-size: 24px;
    }
}

/* Input Group */
.input-group-text {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-left: none;
}

/* Form Check */
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-switch .form-check-input {
    width: 48px;
    height: 24px;
}


.alert-s {
    background-color: #11cd7c;
    padding: 2px 10px;
    box-shadow: 1px 2px 10px #cfcfcf;
    border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
    color: #ffffff;
}

.alert-d {
    background-color: #ce1a1a;
    padding: 2px 10px;
    box-shadow: 1px 2px 10px #cfcfcf;
    border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
    color: #ffffff;
}


.dropdown-item {
    line-height: 35px !important;
}

.dropdown-item i {
    vertical-align: -3px !important;
    margin-left: 5px;
}

.dropdown-item .edit {
    color: #5380b3;
}

.dropdown-item .delete {
    color: #f44336;
}

