/* ═══════════════════════════════════════════
   SunQuote — Custom Styles
   ═══════════════════════════════════════════ */

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #4f4632; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9b9078; }

/* ── Transitions ── */
* { transition-property: background-color, border-color, color, opacity, transform;
    transition-duration: 200ms; transition-timing-function: ease-out; }

/* ── Form Inputs ── */
.sq-input {
    width: 100%;
    background: #2a2a2a;
    border: 1px solid #4f4632;
    border-radius: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: #e4e2e1;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.sq-input:focus {
    border-color: #ffc800;
    box-shadow: 0 0 0 2px rgba(255, 200, 0, 0.15);
}
.sq-input::placeholder { color: #9b9078; }
.sq-input:disabled { opacity: 0.5; cursor: not-allowed; }

select.sq-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%239b9078' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
    cursor: pointer;
}

.sq-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #d2c5ab;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

/* ── Buttons ── */
.sq-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.2s;
}
.sq-btn:active { transform: scale(0.97); }
.sq-btn-primary { background: #ffc800; color: #3e2e00; }
.sq-btn-primary:hover { filter: brightness(1.1); }
.sq-btn-secondary { background: #2a2a2a; color: #e4e2e1; border: 1px solid #4f4632; }
.sq-btn-secondary:hover { background: #353535; }
.sq-btn-danger { background: #93000a; color: #ffdad6; }
.sq-btn-danger:hover { filter: brightness(1.2); }
.sq-btn-ghost { background: transparent; color: #d2c5ab; }
.sq-btn-ghost:hover { background: #2a2a2a; color: #e4e2e1; }
.sq-btn-sm { padding: 0.5rem 1rem; font-size: 13px; border-radius: 0.5rem; }
.sq-btn-lg { padding: 1rem 2rem; font-size: 16px; }

/* ── Cards ── */
.sq-card {
    background: #1b1c1c;
    border-radius: 0.75rem;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* ── Badge/Status ── */
.sq-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
}
.sq-badge-signed { background: rgba(255, 200, 0, 0.1); color: #ffeabb; }
.sq-badge-sent { background: #353535; color: #d2c5ab; }
.sq-badge-draft { background: rgba(255, 180, 171, 0.1); color: #ffb4ab; }
.sq-badge-rejected { background: rgba(147, 0, 10, 0.2); color: #ffb4ab; }
.sq-badge-dot { width: 6px; height: 6px; border-radius: 50%; }
.sq-badge-signed .sq-badge-dot { background: #ffc800; }
.sq-badge-sent .sq-badge-dot { background: #d2c5ab; }
.sq-badge-draft .sq-badge-dot { background: #ffb4ab; }
.sq-badge-rejected .sq-badge-dot { background: #93000a; }

/* ── Toast ── */
.sq-toast {
    background: #2a2a2a;
    border: 1px solid #4f4632;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    color: #e4e2e1;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 450px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    animation: toastIn 0.3s ease-out;
}
.sq-toast-success { border-left: 3px solid #4ade80; }
.sq-toast-error { border-left: 3px solid #ffb4ab; }
.sq-toast-info { border-left: 3px solid #ffc800; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100px); }
}

/* ── Stepper ── */
.sq-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 2rem;
}
.sq-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 13px;
    font-weight: 600;
    color: #9b9078;
    cursor: pointer;
    position: relative;
}
.sq-step.active { color: #ffc800; }
.sq-step.completed { color: #4ade80; }
.sq-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    background: #353535;
    color: #9b9078;
    flex-shrink: 0;
}
.sq-step.active .sq-step-number { background: #ffc800; color: #3e2e00; }
.sq-step.completed .sq-step-number { background: #166534; color: #4ade80; }
.sq-step-line {
    width: 40px;
    height: 2px;
    background: #353535;
    flex-shrink: 0;
}
.sq-step-line.active { background: #ffc800; }

/* ── Table ── */
.sq-table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
}
.sq-table thead th {
    padding: 1rem 1.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #d2c5ab;
    background: rgba(42, 42, 42, 0.5);
    border-bottom: 1px solid #4f4632;
}
.sq-table tbody td {
    padding: 1rem 1.5rem;
    font-size: 15px;
    border-bottom: 1px solid rgba(79, 70, 50, 0.3);
    line-height: 1.5;
}
.sq-table tbody tr:hover { background: rgba(53, 53, 53, 0.4); }

/* ── Tab Navigation ── */
.sq-tabs {
    display: flex;
    gap: 0.25rem;
    background: #1f2020;
    padding: 0.25rem;
    border-radius: 0.5rem;
    overflow-x: auto;
}
.sq-tab {
    padding: 0.625rem 1.25rem;
    font-size: 13px;
    font-weight: 600;
    color: #9b9078;
    border-radius: 0.375rem;
    cursor: pointer;
    white-space: nowrap;
    border: none;
    background: transparent;
}
.sq-tab:hover { color: #e4e2e1; background: #2a2a2a; }
.sq-tab.active { background: #ffc800; color: #3e2e00; }

/* ── Animations ── */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Main Content Area ── */
#app-content > div {
    width: 100%;
}

/* ── Loading spinner ── */
.sq-spinner {
    width: 32px; height: 32px;
    border: 3px solid #353535;
    border-top-color: #ffc800;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Gantt Chart ── */
.gantt-bar {
    height: 28px;
    border-radius: 4px;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 600;
    color: #131313;
    overflow: hidden;
    white-space: nowrap;
}

/* ── Print Styles ── */
@media print {
    body { background: white !important; color: #131313 !important; }
    #sidebar, #sidebar-overlay, header, #toast-container, .no-print { display: none !important; }
    .lg\\:pl-72 { padding-left: 0 !important; }
    main { padding-top: 0 !important; }
    .sq-card { break-inside: avoid; }
}
