/* ===========================================
   MainTemp CSS - Exact Match to React Version
   Using Outfit font and exact Figma values
   =========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: #ffffff;
    color: #1a1b21;
    line-height: normal;
}

/* ========== SIDEBAR ========== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    height: 100vh;
    background-color: #ffffff;
    z-index: 100;
}

.logo-container {
    position: fixed;
    left: 48px;
    top: 29px;
    z-index: 10;
}

.nav-menu {
    position: fixed;
    left: 15px;
    top: 108px;
    width: 210px;
    bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #738176;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.nav-item:hover {
    background-color: rgba(48, 184, 118, 0.05);
}

.nav-item.active {
    background-color: rgba(48, 184, 118, 0.1);
    color: #30b876;
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

/* ========== TOP BAR ========== */
.top-bar {
    position: fixed;
    left: 240px;
    top: 0;
    right: 0;
    height: 80px;
    background-color: #ffffff;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.breadcrumb-container {
    position: absolute;
    left: 0;
    top: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-btn {
    width: 40px;
    height: 40px;
    background-color: #ffffff;
    border: none;
    border-radius: 10px;
    box-shadow: 0px 9px 14px 10px rgba(226, 226, 226, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s;
}

.back-btn:hover {
    opacity: 0.8;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
}

.breadcrumb-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #3f6862;
    white-space: pre;
}

.breadcrumb-text.opacity-60 {
    opacity: 0.6;
}

.top-bar-right {
    position: absolute;
    right: 40px;
    top: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    background-color: #ffffff;
    border: 1px solid #eceaee;
    border-radius: 10px;
    height: 44px;
    width: 250px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    transition: border-color 0.2s;
}

.search-box:focus-within {
    border-color: #162f2b;
}

.search-box input {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #1a1b21;
    background-color: transparent;
    border: none;
    outline: none;
    width: 100%;
}

.search-box input::placeholder {
    color: #738176;
}

.lang-selector,
.notification-btn {
    height: 40px;
    border: 1px solid #eceaee;
    border-radius: 10px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.lang-selector:hover,
.notification-btn:hover {
    background-color: #f8f8f8;
}

.notification-btn {
    width: 40px;
    padding: 0;
}

.lang-selector span {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #738176;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.profile-btn span {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #1a1b21;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #30b876;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 14px;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    position: absolute;
    left: 240px;
    top: 80px;
    width: 1200px;
    padding: 32px;
    background-color: #f8f8f8;
    border-top-left-radius: 30px;
    min-height: calc(100vh - 80px);
}

/* ========== TYPOGRAPHY ========== */
.heading-1 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 32px;
    color: #1a1b21;
    line-height: normal;
}

.heading-2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 24px;
    color: #1a1b21;
    line-height: normal;
    margin-bottom: 16px;
}

.heading-3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 18px;
    color: #1a1b21;
    line-height: normal;
}

.body {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #1a1b21;
    line-height: 1.6;
}

.body-medium {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #1a1b21;
    line-height: 1.6;
}

.label {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #1a1b21;
    line-height: normal;
}

.caption {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 12px;
    color: #738176;
    line-height: normal;
}

.small {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 11px;
    color: #848484;
    line-height: normal;
}

.price {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: #30b876;
    line-height: normal;
}

/* ========== SECTIONS ========== */
.section {
    margin-bottom: 32px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 16px 20px;
    border-radius: 10px;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-primary {
    background-color: #162f2b;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #1a3a34;
}

.btn-secondary {
    background-color: #ffffff;
    color: #162f2b;
    border: 1px solid #162f2b;
}

.btn-secondary:hover {
    background-color: #f8f8f8;
}

.btn-outline {
    background-color: #ffffff;
    color: #162f2b;
    border: 1px solid #eceaee;
}

.btn-outline:hover {
    background-color: #f8f8f8;
}

.button-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ========== STAT CARDS ========== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background-color: #ffffff;
    border: 1px solid #eceaee;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.stat-card-content {
    flex: 1;
}

.stat-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #738176;
    margin-bottom: 8px;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 32px;
    margin-bottom: 8px;
}

.stat-subtitle {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 12px;
    color: #738176;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background-color: #f8f8f8;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ========== TABS ========== */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #eceaee;
    margin-bottom: 24px;
}

.tab-btn {
    padding: 12px 24px;
    background-color: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #738176;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -1px;
}

.tab-btn:hover {
    color: #1a1b21;
}

.tab-btn.active {
    color: #30b876;
    border-bottom-color: #30b876;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ========== CARDS ========== */
.content-card {
    background-color: #ffffff;
    border: 1px solid #eceaee;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
}

.card-header {
    margin-bottom: 20px;
}

.card-header .heading-3 {
    margin-bottom: 4px;
}

/* ========== TABLES ========== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background-color: #f8f8f8;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 12px;
    color: #738176;
    border-bottom: 1px solid #eceaee;
}

.data-table td {
    padding: 12px 16px;
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #1a1b21;
    border-bottom: 1px solid #eceaee;
}

.data-table tbody tr {
    transition: background-color 0.2s;
    cursor: pointer;
}

.data-table tbody tr:hover {
    background-color: #f8f8f8;
}

/* ========== BADGES ========== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 16px;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 12px;
}

.badge-success {
    background-color: rgba(48, 184, 118, 0.1);
    color: #30b876;
}

.badge-warning {
    background-color: rgba(173, 151, 7, 0.1);
    color: #ad9707;
}

.badge-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.badge-info {
    background-color: rgba(63, 104, 98, 0.1);
    color: #3f6862;
}

/* ========== TAGS ========== */
.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 6px;
    background-color: #f8f8f8;
    color: #1a1b21;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 12px;
}

/* ========== FORMS ========== */
.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input,
.select {
    width: 100%;
    height: 44px;
    padding: 10px 14px;
    border: 1px solid #eceaee;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #1a1b21;
    background-color: #ffffff;
    transition: all 0.2s;
}

.input:focus,
.select:focus {
    outline: none;
    border-color: #162f2b;
}

.input::placeholder {
    color: #738176;
}

/* ========== AVATAR GROUP ========== */
.avatar-group {
    display: flex;
    align-items: center;
    margin-top: 16px;
}

.avatar-group img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    margin-left: -10px;
    object-fit: cover;
}

.avatar-group img:first-child {
    margin-left: 0;
}

.avatar-more {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f8f8f8;
    border: 2px solid #ffffff;
    margin-left: -10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: #738176;
}

/* ========== ICON BUTTONS ========== */
.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background-color: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    background-color: #eceaee;
}

/* ========== ICON GRID ========== */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 24px;
}

.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* ========== TWO COLUMN GRID ========== */
.two-col-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.empty-icon {
    width: 64px;
    height: 64px;
    color: #738176;
    opacity: 0.5;
    margin-bottom: 16px;
}

.empty-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 18px;
    color: #1a1b21;
    margin-bottom: 8px;
}

.empty-description {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #738176;
    margin-bottom: 24px;
}

/* ========== AVATAR SHOWCASE ========== */
.avatar-showcase {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.avatar-sizes {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-md {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-lg {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-group-label {
    margin-top: 8px;
}

/* ========== SHOWCASE SECTIONS ========== */
.typography-showcase,
.badge-showcase,
.button-showcase {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.showcase-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.flex-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* ========== DEVELOPMENT NOTES ========== */
.dev-notes {
    padding: 24px;
    background-color: #e8f5e9;
    border: 1px solid #30b876;
    border-radius: 12px;
}

.dev-notes .heading-3 {
    margin-bottom: 12px;
}

.dev-notes .body {
    margin-bottom: 16px;
}

.notes-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notes-list li {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 12px;
    color: #1a1b21;
    padding: 4px 0;
    padding-left: 16px;
    position: relative;
}

.notes-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #30b876;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1440px) {
    .main-content {
        width: calc(100vw - 240px);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .top-bar,
    .main-content {
        left: 0;
    }
    
    .stat-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        gap: 16px;
    }
}

/* ========== DYNAMIC NAVIGATION ========== */
.nav-section {
    margin-bottom: 24px;
}

.nav-section-label {
    font-size: 11px;
    font-weight: 600;
    color: #738176;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding: 0 20px;
}

.nav-item.has-subnav {
    position: relative;
    cursor: pointer;
}

.nav-item.has-subnav .nav-arrow {
    margin-left: auto;
    transition: transform 0.2s ease;
}

.nav-item.has-subnav.expanded .nav-arrow {
    transform: rotate(180deg);
}

.subnav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    margin: 4px 0;
    border-radius: 8px;
    margin-left: 16px;
}

.subnav.expanded {
    max-height: 500px;
}

.subnav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: #738176;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 400;
    margin: 2px 0;
}

.subnav-item:hover {
    background-color: rgba(48, 184, 118, 0.05);
    color: #30b876;
}

.subnav-item.active {
    background-color: rgba(48, 184, 118, 0.1);
    color: #30b876;
}

.task-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.task-status-dot.status-completed {
    background-color: #10B981;
}

.task-status-dot.status-in-progress {
    background-color: #F59E0B;
}

.task-status-dot.status-draft {
    background-color: #6B7280;
}

/* Breadcrumb styles */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #738176;
}

.breadcrumb-separator {
    color: #9CA3AF;
}

.breadcrumb-item {
    color: #738176;
}

.breadcrumb-item.current {
    color: #1D1D21;
    font-weight: 500;
}

/* ========== DASHBOARD STYLES ========== */
.department-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 16px;
}

.department-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 24px;
    transition: all 0.2s ease;
}

.department-card:hover {
    border-color: #30b876;
    box-shadow: 0 4px 12px rgba(48, 184, 118, 0.1);
}

.department-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.department-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.department-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(48, 184, 118, 0.1);
    border-radius: 12px;
    color: #30b876;
    flex-shrink: 0;
}

.department-icon svg {
    width: 24px;
    height: 24px;
}

.department-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1D1D21;
    margin-bottom: 4px;
}

.department-info p {
    font-size: 14px;
    color: #738176;
    line-height: 1.4;
}

.department-stats {
    display: flex;
    gap: 24px;
}

.department-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.department-stat .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1D1D21;
    line-height: 1;
    margin-bottom: 4px;
}

.department-stat .stat-label {
    font-size: 12px;
    font-weight: 500;
    color: #738176;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Recent Tasks */
.recent-tasks-list {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    margin-top: 16px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.task-item:last-child {
    border-bottom: none;
}

.task-item:hover {
    background-color: #f9fafb;
}

.task-item.loading {
    opacity: 0.6;
}

.task-content {
    flex: 1;
}

.task-title {
    font-size: 14px;
    font-weight: 600;
    color: #1D1D21;
    margin-bottom: 4px;
}

.task-title a {
    color: inherit;
    text-decoration: none;
}

.task-title a:hover {
    color: #30b876;
}

.task-meta {
    font-size: 12px;
    color: #738176;
    margin: 0;
}

.task-time {
    font-size: 12px;
    color: #9CA3AF;
    font-weight: 500;
    flex-shrink: 0;
}

/* Stat card variants */
.stat-card.success {
    border-color: #10B981;
}

.stat-card.success .stat-value {
    color: #10B981;
}

.stat-card.warning {
    border-color: #F59E0B;
}

.stat-card.warning .stat-value {
    color: #F59E0B;
}

.stat-card.info {
    border-color: #6B7280;
}

.stat-card.info .stat-value {
    color: #6B7280;
}