/* ============================================================
   Greenleaf Türkiye — Tabler Theme Enhancements & Tree Styling
   ============================================================ */

:root {
    --pkg-bronze: #cd7f32;
    --pkg-silver: #9aa0ac;
    --pkg-gold: #f59f00;
    --pkg-platinum: #7048e8;
}

/* Binary Tree Visualizer Styles */
.tree-card {
    position: relative;
    overflow: hidden;
}

#tree-container {
    width: 100%;
    min-height: 580px;
    background: #f8fafc;
    border-radius: 8px;
    overflow: auto;
    position: relative;
    border: 1px solid rgba(98, 105, 118, 0.16);
}

.tree__canvas {
    width: 100%;
    min-height: 560px;
    display: block;
}

.tree__node {
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), filter 0.2s ease;
}

.tree__node:hover {
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.12));
}

.tree__node rect {
    transition: stroke 0.2s ease;
    stroke: rgba(0, 0, 0, 0.08);
    stroke-width: 1.5;
}

.tree__node--active rect {
    stroke: #2fb344 !important;
    stroke-width: 3 !important;
}

.tree__node text {
    font-family: var(--tblr-font-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    user-select: none;
    text-anchor: middle;
}

.tree__node--empty {
    cursor: pointer;
    transition: filter 0.2s ease;
}

.tree__node--empty:hover {
    filter: drop-shadow(0 4px 8px rgba(47, 179, 68, 0.25));
}

.tree__node--empty circle {
    fill: #ffffff;
    stroke: #2fb344;
    stroke-width: 2;
    stroke-dasharray: 4 3;
    transition: fill 0.2s ease, stroke-width 0.2s ease;
}

.tree__node--empty:hover circle {
    fill: #e8f7ec;
    stroke: #2fb344;
    stroke-width: 2.5;
    stroke-dasharray: none;
}

.tree__node--empty text {
    transition: fill 0.2s ease;
}

.tree__node--empty:hover text {
    fill: #2fb344;
    font-weight: bold;
}

.tree__connector {
    fill: none;
    stroke: #cbd5e1;
    stroke-width: 2.5;
    stroke-linecap: round;
}

/* Login Page Aesthetics */
.page-login-box {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
}

/* Package Selection Cards */
.package-card-option {
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.package-card-option:hover {
    border-color: #2fb344;
    transform: translateY(-2px);
}

.package-card-option.selected {
    border-color: #2fb344;
    background-color: rgba(47, 179, 68, 0.04);
}

/* ============================================================
   Action Buttons & Icon Button Reset (Fix for overlapping icons)
   ============================================================ */
.btn-icon,
.btn-action {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 2.25rem !important;
    height: 2.25rem !important;
    min-width: 2.25rem !important;
    max-width: 2.25rem !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    flex: 0 0 2.25rem !important;
}

.btn-sm.btn-icon,
.btn-icon.btn-sm,
.btn-sm.btn-action,
.btn-action.btn-sm {
    width: 2rem !important;
    height: 2rem !important;
    min-width: 2rem !important;
    max-width: 2rem !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    flex: 0 0 2rem !important;
}

.btn-icon .icon,
.btn-action .icon,
.btn-icon svg,
.btn-action svg {
    margin: 0 !important;
    width: 1.1rem !important;
    height: 1.1rem !important;
    stroke-width: 2 !important;
    pointer-events: none;
    flex-shrink: 0;
}

.table-action-btns {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.35rem !important;
    white-space: nowrap !important;
}

.table-action-btns form {
    display: inline-flex !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Tabler btn-list negative margin reset */
.btn-list {
    display: inline-flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.4rem !important;
    margin: 0 !important;
}

.btn-list.flex-nowrap {
    flex-wrap: nowrap !important;
}

.btn-list > * {
    margin: 0 !important;
}

/* ============================================================
   Field Coaching & DMO (Daily Method of Operation) Design System
   ============================================================ */
:root {
    --primary-green: #1b4332;
    --brand-accent: #2d6a4f;
    --brand-emerald: #40916c;
    --gold: #c5a059;
    --gold-light: #fef9e7;
    --bg-dmo: #f8f9fa;
    --surface-dmo: #ffffff;
}

.dmo-card {
    background: var(--surface-dmo);
    border-radius: 14px;
    border: 1px solid rgba(27, 67, 50, 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dmo-card-header {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--brand-accent) 100%);
    color: #ffffff;
    border-radius: 13px 13px 0 0;
    padding: 1.1rem 1.25rem;
}

.dmo-streak-badge {
    background: linear-gradient(135deg, #ff6b35 0%, #f72585 100%);
    color: #ffffff;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.35);
    animation: streakGlow 2.5s infinite ease-in-out;
}

@keyframes streakGlow {
    0%, 100% { transform: scale(1); box-shadow: 0 3px 10px rgba(255, 107, 53, 0.35); }
    50% { transform: scale(1.03); box-shadow: 0 4px 16px rgba(255, 107, 53, 0.55); }
}

.dmo-metric-item {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.dmo-metric-item:hover {
    border-color: var(--brand-emerald);
    box-shadow: 0 2px 10px rgba(45, 106, 79, 0.08);
}

.dmo-metric-item.completed {
    border-color: #2fb344;
    background: rgba(47, 179, 68, 0.03);
}

.dmo-btn-circle {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    padding: 0 !important;
    cursor: pointer;
    user-select: none;
    transition: transform 0.1s ease, background-color 0.2s ease;
    border: 1.5px solid transparent;
}

.dmo-btn-circle:active {
    transform: scale(0.90);
}

.dmo-btn-minus {
    background: #f1f3f5;
    color: #495057;
    border-color: #dee2e6;
}

.dmo-btn-minus:hover {
    background: #e9ecef;
    color: #212529;
}

.dmo-btn-plus {
    background: var(--brand-accent);
    color: #ffffff;
    border-color: var(--brand-accent);
}

.dmo-btn-plus:hover {
    background: var(--primary-green);
    color: #ffffff;
}

.dmo-progress {
    height: 8px;
    border-radius: 6px;
    background: #e9ecef;
    overflow: hidden;
}

.dmo-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-emerald) 0%, #2fb344 100%);
    border-radius: 6px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dmo-nav-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
    color: #212529;
    transition: all 0.2s ease;
    height: 100%;
}

.dmo-nav-card:hover {
    text-decoration: none;
    color: var(--primary-green);
    border-color: var(--brand-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(27, 67, 50, 0.10);
}

.dmo-nav-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(45, 106, 79, 0.08);
    color: var(--brand-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease;
}

.dmo-nav-card:hover .dmo-nav-icon {
    background: var(--primary-green);
    color: #ffffff;
}

.onboarding-banner {
    background: linear-gradient(135deg, #f8fbf9 0%, #eef6f1 100%);
    border: 1px solid rgba(45, 106, 79, 0.2);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

/* ============================================================
   10-Slot Binary Tree Visualization System
   ============================================================ */
.tree-root-hero {
    background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);
    color: #ffffff;
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 6px 20px rgba(27, 67, 50, 0.15);
    margin-bottom: 1.75rem;
}

.tree-wing-card {
    border-radius: 14px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
    background: #ffffff;
    height: 100%;
}

.tree-wing-header-left {
    background: linear-gradient(135deg, #0ca678 0%, #2fb344 100%);
    color: #ffffff;
    border-radius: 13px 13px 0 0;
    padding: 1rem 1.25rem;
}

.tree-wing-header-right {
    background: linear-gradient(135deg, #206bc4 0%, #4299e1 100%);
    color: #ffffff;
    border-radius: 13px 13px 0 0;
    padding: 1rem 1.25rem;
}

.tree-slot-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
    position: relative;
}

.tree-slot-card:hover {
    border-color: #2d6a4f;
    box-shadow: 0 4px 12px rgba(45, 106, 79, 0.10);
    transform: translateY(-2px);
}

.tree-slot-card.empty {
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
}

.tree-slot-card.empty:hover {
    border-color: #2fb344;
    background: #f0fdf4;
}

.slot-number-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}
