/**
 * Components Stylesheet
 * File: assets/css/components.css
 * Dashboard front-end components (sidebar, header, etc.)
 */

/* ═══════════════════════════════════════════════════════════════
   Dashboard Layout
   ═══════════════════════════════════════════════════════════════ */
.dc-dashboard {
    display: flex;
    min-height: 100vh;
    background: var(--dc-gray-50, #f9fafb);
}

/* ═══════════════════════════════════════════════════════════════
   Sidebar
   ═══════════════════════════════════════════════════════════════ */
.dc-dashboard__sidebar {
    width: 260px;
    background: #fff;
    border-right: 1px solid var(--dc-gray-200, #e5e7eb);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.dc-dashboard__sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--dc-gray-200, #e5e7eb);
}

.dc-dashboard__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.dc-dashboard__logo-text {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--dc-primary-700, #115e59);
}

.dc-dashboard__sidebar-close {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dc-gray-500, #6b7280);
}

.dc-dashboard__nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}
.dc-dashboard__nav-label {
    padding: 16px 20px 6px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--dc-gray-400, #9ca3af);
}
.dc-dashboard__nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.dc-dashboard__nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--dc-gray-600, #4b5563);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.dc-dashboard__nav-link:hover {
    background: var(--dc-gray-50, #f9fafb);
    color: var(--dc-primary-600, #0f766e);
}
.dc-dashboard__nav-item--active .dc-dashboard__nav-link {
    background: rgba(13, 148, 136, 0.05);
    color: var(--dc-primary-600, #0f766e);
    border-left-color: var(--dc-primary-600, #0f766e);
    font-weight: 600;
}
.dc-dashboard__nav-icon { font-size: 1rem; width: 20px; text-align: center; }
.dc-dashboard__nav-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
}

.dc-dashboard__sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--dc-gray-200, #e5e7eb);
}
.dc-dashboard__user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.dc-dashboard__user-meta {
    display: flex;
    flex-direction: column;
}
.dc-dashboard__user-meta strong { font-size: 0.8125rem; }
.dc-dashboard__user-meta small { font-size: 0.6875rem; color: var(--dc-gray-500, #6b7280); }

.dc-dashboard__logout-form { margin: 0; }

@media (max-width: 768px) {
    .dc-dashboard__sidebar {
        transform: translateX(-100%);
    }
    .dc-dashboard__sidebar.is-open {
        transform: translateX(0);
    }
    .dc-dashboard__sidebar-close { display: block; }
}

/* ═══════════════════════════════════════════════════════════════
   Dashboard Main Content
   ═══════════════════════════════════════════════════════════════ */
.dc-dashboard__main {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
}
@media (max-width: 768px) {
    .dc-dashboard__main { margin-left: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   Dashboard Header
   ═══════════════════════════════════════════════════════════════ */
.dc-dashboard__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: #fff;
    border-bottom: 1px solid var(--dc-gray-200, #e5e7eb);
    position: sticky;
    top: 0;
    z-index: 50;
}

.dc-dashboard__header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dc-dashboard__menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
@media (max-width: 768px) {
    .dc-dashboard__menu-toggle { display: block; }
}

.dc-dashboard__header-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--dc-gray-900, #111827);
}
.dc-dashboard__header-subtitle {
    font-size: 0.8125rem;
    color: var(--dc-gray-500, #6b7280);
    margin: 2px 0 0;
}

.dc-dashboard__header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Dashboard Search */
.dc-dashboard__search {
    position: relative;
}
.dc-dashboard__search .dc-input--sm {
    width: 240px;
    padding: 6px 12px;
    font-size: 0.8125rem;
}
@media (max-width: 640px) {
    .dc-dashboard__search { display: none; }
}
.dc-dashboard__search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--dc-gray-200, #e5e7eb);
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 50;
}

/* Notification */
.dc-dashboard__notification-btn {
    background: none;
    border: none;
    position: relative;
    cursor: pointer;
    padding: 6px;
    font-size: 1.25rem;
}
.dc-dashboard__notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* User Dropdown */
.dc-dashboard__user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid var(--dc-gray-200, #e5e7eb);
    border-radius: 6px;
    padding: 4px 12px 4px 4px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.dc-dashboard__user-btn:hover {
    border-color: var(--dc-gray-400, #9ca3af);
}
.dc-dashboard__user-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--dc-gray-700, #374151);
}
@media (max-width: 640px) {
    .dc-dashboard__user-name { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   CTA Section (used on front-page)
   ═══════════════════════════════════════════════════════════════ */
.dc-cta-section {
    background: linear-gradient(135deg, var(--dc-primary-600, #0f766e) 0%, var(--dc-primary-700, #115e59) 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}
.dc-cta-section__title {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 8px;
}
.dc-cta-section__text {
    opacity: 0.9;
    font-size: 1.125rem;
    margin-bottom: 24px;
}
.dc-cta-section__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
