/* LIVE-DEPLOY-20260521 */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --ai-bg: #f4f2ef;
    --ai-surface: #ffffff;
    --ai-ink: #1a1a1a;
    --ai-muted: #6b6560;
    --ai-accent: #8b7355;
    --ai-accent-dark: #6d5a43;
    --ai-accent-soft: rgba(139, 115, 85, 0.12);
    --ai-sidebar: #141414;
    --ai-border: #e3ded8;
    --ai-shadow: 0 1px 2px rgba(26, 22, 18, 0.04), 0 4px 16px rgba(26, 22, 18, 0.06);
    --ai-shadow-hover: 0 4px 8px rgba(26, 22, 18, 0.06), 0 12px 28px rgba(26, 22, 18, 0.1);
    --ai-radius: 12px;
    --ai-radius-sm: 8px;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--ai-bg);
    color: var(--ai-ink);
    -webkit-font-smoothing: antialiased;
}

.ai-serif {
    font-family: 'Cormorant Garamond', Georgia, serif;
}

/* —— Layout & motion —— */
.ai-main-content {
    animation: ai-fade-in 0.35s ease-out;
}

@keyframes ai-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-sidebar {
    background: linear-gradient(180deg, #1c1c1c 0%, #0d0d0d 100%);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

/* —— Sidebar navigation —— */
.ai-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.ai-nav-section-label {
    padding: 0.5rem 0.75rem 0.35rem;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #57534e;
    font-weight: 600;
}

.ai-nav-admin-divider {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-nav-group {
    margin-bottom: 0.1rem;
}

/* Submeniu fără JS — <details>/<summary> */
.ai-nav-details {
    margin-bottom: 0.1rem;
}

.ai-nav-details > summary {
    list-style: none;
    cursor: pointer;
}

.ai-nav-details > summary::-webkit-details-marker {
    display: none;
}

.ai-nav-details[open] .ai-nav-chevron {
    transform: rotate(180deg);
    opacity: 0.9;
}

.ai-nav-parent,
.ai-nav-logout {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
    padding: 0.5rem 0.65rem;
    border-radius: var(--ai-radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    color: #a8a29e;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: color 0.2s ease, background 0.2s ease;
}

/* Lucide înlocuiește <i> cu <svg> display:block — forțăm aliniere orizontală */
.ai-sidebar .ai-nav-parent svg,
.ai-sidebar .ai-nav-logout svg {
    display: block;
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
}

.ai-nav-parent:hover,
.ai-nav-logout:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.ai-nav-parent.is-active {
    color: #fff;
    background: linear-gradient(90deg, rgba(139, 115, 85, 0.35) 0%, rgba(255, 255, 255, 0.06) 100%);
    box-shadow: inset 3px 0 0 var(--ai-accent);
}

.ai-nav-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    display: block;
}

.ai-nav-parent.is-active .ai-nav-icon,
.ai-nav-sublink.is-active .ai-nav-icon {
    color: #d4c4b0;
}

.ai-nav-label {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.ai-nav-chevron {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
    opacity: 0.5;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.ai-nav-chevron.is-open {
    transform: rotate(180deg);
    opacity: 0.9;
}

.ai-nav-sub {
    padding: 0.15rem 0 0.35rem 0.35rem;
    margin-left: 0.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-nav-sublink {
    display: block;
    padding: 0.4rem 0.65rem 0.4rem 1.35rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #78716c;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s ease, background 0.15s ease;
}

.ai-nav-sublink:hover {
    color: #e7e5e4;
    background: rgba(255, 255, 255, 0.05);
}

.ai-nav-sublink.is-active {
    color: #fff;
    background: rgba(139, 115, 85, 0.25);
}

/* Legacy flat links (guest etc.) */
.ai-nav-link {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.65rem;
    border-radius: var(--ai-radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    color: #a8a29e;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.ai-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.ai-nav-link.is-active {
    color: #fff;
    background: linear-gradient(90deg, rgba(139, 115, 85, 0.35) 0%, rgba(255, 255, 255, 0.08) 100%);
    box-shadow: inset 3px 0 0 var(--ai-accent);
}

/* —— Cards —— */
.ai-card {
    background: var(--ai-surface);
    border: 1px solid var(--ai-border);
    border-radius: var(--ai-radius);
    box-shadow: var(--ai-shadow);
    transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.ai-card:hover {
    border-color: #d4cdc4;
}

.ai-card-interactive {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.ai-card-interactive:hover {
    border-color: var(--ai-accent);
    box-shadow: var(--ai-shadow-hover);
    transform: translateY(-2px);
}

.ai-card-interactive::after {
    content: '→';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
    opacity: 0;
    color: var(--ai-accent);
    font-weight: 600;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.ai-card-interactive.ai-card-row {
    position: relative;
    padding-right: 2.5rem;
}

.ai-card-interactive.ai-card-row:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* —— Buttons —— */
.ai-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: var(--ai-radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ai-btn:active {
    transform: scale(0.98);
}

.ai-btn-primary {
    background: linear-gradient(180deg, #9a8060 0%, var(--ai-accent) 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(139, 115, 85, 0.35);
}

.ai-btn-primary:hover {
    background: linear-gradient(180deg, var(--ai-accent) 0%, var(--ai-accent-dark) 100%);
    box-shadow: 0 4px 14px rgba(139, 115, 85, 0.45);
    transform: translateY(-1px);
}

.ai-btn-ghost {
    border: 1px solid var(--ai-border);
    background: #fff;
    color: var(--ai-ink);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ai-btn-ghost:hover {
    background: var(--ai-accent-soft);
    border-color: var(--ai-accent);
    color: var(--ai-accent-dark);
}

.ai-btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
}

.ai-btn-icon {
    padding: 0.45rem;
    border-radius: var(--ai-radius-sm);
}

/* —— Form controls —— */
.ai-input,
.ai-select {
    width: 100%;
    border: 1px solid var(--ai-border);
    border-radius: var(--ai-radius-sm);
    padding: 0.55rem 0.8rem;
    font-size: 0.875rem;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ai-input:focus,
.ai-select:focus {
    outline: none;
    border-color: var(--ai-accent);
    box-shadow: 0 0 0 3px var(--ai-accent-soft);
}

.ai-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ai-muted);
    margin-bottom: 0.35rem;
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* —— Page chrome —— */
.ai-page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--ai-border);
}

.ai-page-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.875rem;
    font-weight: 600;
    line-height: 1.2;
}

.ai-page-subtitle {
    font-size: 0.875rem;
    color: var(--ai-muted);
    margin-top: 0.25rem;
}

.ai-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.ai-toolbar form.inline {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.ai-breadcrumb {
    font-size: 0.8125rem;
    color: var(--ai-muted);
    margin-bottom: 1rem;
}

.ai-breadcrumb a {
    color: var(--ai-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.ai-breadcrumb a:hover {
    color: var(--ai-accent);
}

.ai-link {
    color: var(--ai-accent);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
}

.ai-link:hover {
    color: var(--ai-accent-dark);
    text-decoration: underline;
}

.ai-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

/* —— Stats (dashboard) —— */
.ai-stat-card {
    display: block;
    background: var(--ai-surface);
    border: 1px solid var(--ai-border);
    border-radius: var(--ai-radius);
    padding: 1.1rem 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.ai-stat-card:hover {
    border-color: var(--ai-accent);
    box-shadow: var(--ai-shadow-hover);
    transform: translateY(-3px);
}

.ai-stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ai-muted);
    font-weight: 600;
}

.ai-stat-value {
    font-size: 1.65rem;
    font-weight: 700;
    margin-top: 0.35rem;
    line-height: 1.2;
}

/* —— Kanban (Monday / ClickUp style) —— */
.ai-kanban-board {
    align-items: flex-start;
    padding-bottom: 0.5rem;
}

.ai-kanban-col {
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--ai-radius);
    padding: 0.5rem;
    border: 1px solid var(--ai-border);
}

.ai-kanban-col-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem 0.75rem;
}

.ai-kanban-cards {
    min-height: 140px;
    padding: 0.35rem;
    border-radius: var(--ai-radius-sm);
    background: #ebe8e4;
    transition: background 0.2s ease;
}

.ai-kanban-cards.sortable-drag-over {
    background: var(--ai-accent-soft);
}

.ai-kanban-card {
    border: 1px solid var(--ai-border);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}

.ai-kanban-card:hover {
    border-color: var(--ai-accent);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.ai-kanban-card.sortable-ghost {
    opacity: 0.5;
    transform: rotate(2deg);
}

/* —— Gantt & flow —— */
.ai-gantt-row:last-child {
    border-bottom: none;
}

.ai-flow-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--ai-accent) 0%, var(--ai-accent-dark) 100%);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(139, 115, 85, 0.4);
}

/* —— List rows —— */
.ai-list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--ai-radius-sm);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.ai-list-row:hover {
    background: var(--ai-accent-soft);
}

/* —— Alerts —— */
.ai-alert-success {
    animation: ai-slide-down 0.3s ease-out;
    border-radius: var(--ai-radius-sm);
}

@keyframes ai-slide-down {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

[x-cloak] {
    display: none !important;
}

/* Progress bar pulse on project */
.ai-progress-bar {
    height: 0.5rem;
    background: #ebe8e4;
    border-radius: 999px;
    overflow: hidden;
}

.ai-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ai-accent-dark), var(--ai-accent));
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Widget card header */
.ai-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--ai-border);
}

.ai-widget-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ai-ink);
}

.ai-kanban-col-title {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ai-muted);
}

.ai-kanban-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--ai-border);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--ai-muted);
}

.ai-mini-progress {
    height: 4px;
    background: #ebe8e4;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 0.5rem;
    max-width: 120px;
}

.ai-mini-progress > span {
    display: block;
    height: 100%;
    background: var(--ai-accent);
    border-radius: 999px;
}

.ai-view-tabs {
    display: inline-flex;
    gap: 0.25rem;
    padding: 0.25rem;
    background: #fff;
    border: 1px solid var(--ai-border);
    border-radius: var(--ai-radius-sm);
    margin-bottom: 1.25rem;
}

.ai-view-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ai-muted);
    text-decoration: none;
    transition: all 0.15s ease;
}

.ai-view-tab:hover {
    color: var(--ai-ink);
    background: var(--ai-accent-soft);
}

.ai-view-tab.is-active {
    background: var(--ai-accent);
    color: #fff;
    box-shadow: 0 2px 6px rgba(139, 115, 85, 0.3);
}

.ai-empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--ai-muted);
    font-size: 0.875rem;
}

.ai-stat-card .ai-stat-value {
    font-variant-numeric: tabular-nums;
}

/* Notifications bell */
.ai-notifications {
    position: relative;
}

.ai-notifications-panel {
    top: 100%;
}

/* Notifications bell */
.ai-notifications {
    position: relative;
}

.ai-notifications-panel {
    top: 100%;
}
