/* =====================================================================
   TravelScrapper — stiluri proprii (Tailwind se ocupa de restul)
   ===================================================================== */

:root {
    color-scheme: dark;
}

* {
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    text-rendering: optimizeLegibility;
}

/* ---------------------------------------------------------------
   Scrollbar
   --------------------------------------------------------------- */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, .18);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, .32);
    background-clip: content-box;
}

/* ---------------------------------------------------------------
   Focus vizibil pentru accesibilitate
   --------------------------------------------------------------- */
:focus-visible {
    outline: 2px solid rgba(56, 189, 248, .6);
    outline-offset: 2px;
}

/* ---------------------------------------------------------------
   Animatii
   --------------------------------------------------------------- */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(56, 189, 248, .45); }
    70%  { box-shadow: 0 0 0 8px rgba(56, 189, 248, 0); }
    100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

@keyframes shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position: 600px 0; }
}

.animate-fade-up {
    animation: fade-up .35s ease-out both;
}

.animate-pulse-ring {
    animation: pulse-ring 2s infinite;
}

/* Intarziere in cascada pentru carduri */
.stagger > * {
    animation: fade-up .35s ease-out both;
}
.stagger > *:nth-child(1) { animation-delay: .02s; }
.stagger > *:nth-child(2) { animation-delay: .05s; }
.stagger > *:nth-child(3) { animation-delay: .08s; }
.stagger > *:nth-child(4) { animation-delay: .11s; }
.stagger > *:nth-child(5) { animation-delay: .14s; }
.stagger > *:nth-child(6) { animation-delay: .17s; }
.stagger > *:nth-child(7) { animation-delay: .20s; }
.stagger > *:nth-child(8) { animation-delay: .23s; }

/* ---------------------------------------------------------------
   Tabele
   --------------------------------------------------------------- */
.table-wrap {
    overflow-x: auto;
    border-radius: .9rem;
    border: 1px solid rgba(255, 255, 255, .06);
}

table.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13.5px;
}

table.data-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(10, 18, 36, .96);
    backdrop-filter: blur(8px);
    padding: .7rem .9rem;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #64748b;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

table.data-table tbody td {
    padding: .75rem .9rem;
    border-bottom: 1px solid rgba(255, 255, 255, .04);
    color: #cbd5e1;
    vertical-align: middle;
}

table.data-table tbody tr {
    transition: background-color .12s ease;
}

table.data-table tbody tr:hover {
    background: rgba(255, 255, 255, .025);
}

table.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ---------------------------------------------------------------
   Formulare
   --------------------------------------------------------------- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="date"],
input[type="time"],
input[type="search"],
select,
textarea {
    color-scheme: dark;
}

select option {
    background: #0e172b;
    color: #e2e8f0;
}

/* Input de tip checkbox/radio in tema inchisa */
input[type="checkbox"],
input[type="radio"] {
    accent-color: #0ea5e9;
}

/* ---------------------------------------------------------------
   Puncte de status
   --------------------------------------------------------------- */
.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.status-dot.is-active {
    background: #34d399;
    box-shadow: 0 0 8px rgba(52, 211, 153, .8);
}

.status-dot.is-paused {
    background: #fbbf24;
    box-shadow: 0 0 8px rgba(251, 191, 36, .7);
}

.status-dot.is-error {
    background: #fb7185;
    box-shadow: 0 0 8px rgba(251, 113, 133, .8);
}

.status-dot.is-idle {
    background: #64748b;
}

/* ---------------------------------------------------------------
   Bare de progres / mini-grafice
   --------------------------------------------------------------- */
.bar-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #0ea5e9, #6366f1);
    transition: width .6s cubic-bezier(.4, 0, .2, 1);
}

/* ---------------------------------------------------------------
   Efect de schelet la incarcare
   --------------------------------------------------------------- */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.08) 50%, rgba(255,255,255,.04) 75%);
    background-size: 600px 100%;
    animation: shimmer 1.4s infinite linear;
    border-radius: .5rem;
}

/* ---------------------------------------------------------------
   Editor de cod / selector CSS
   --------------------------------------------------------------- */
.code-input {
    font-family: ui-monospace, "SF Mono", Menlo, Monaco, "Cascadia Code", monospace;
    font-size: 12.5px;
    letter-spacing: .01em;
}

/* ---------------------------------------------------------------
   Sidebar pe mobil
   --------------------------------------------------------------- */
body.sidebar-open {
    overflow: hidden;
}

/* ---------------------------------------------------------------
   Print (pentru previzualizare rapoarte)
   --------------------------------------------------------------- */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
    }

    .no-print {
        display: none !important;
    }
}
