/* =========================
   GLOBAL FORMS
========================= */

form {
    display: grid;
    gap: 1rem;
}

label {
    color: #cbd5e1;
    font-size: 0.92rem;
    font-weight: 600;
}


/* =========================
   INPUTS
========================= */

input,
select,
textarea {
    width: 100%;

    padding: 1rem 1.1rem;

    border-radius: 18px;

    border:
        1px solid rgba(148, 163, 184, 0.16);

    background:
        rgba(15, 23, 42, 0.82);

    color: #f8fafc;

    font-size: 1rem;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;

    border-color:
        rgba(34, 197, 94, 0.45);

    box-shadow:
        0 0 0 4px rgba(34, 197, 94, 0.12);
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.75;
    cursor: pointer;
}

/* =========================
   TEXTAREA
========================= */

textarea {
    min-height: 120px;
    resize: vertical;
}


/* =========================
   DASHBOARD FILTERS
========================= */

.dashboard-filters {
    margin-top: 0.25rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.filter-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;

    color: rgba(245, 250, 255, 0.88);

    font-weight: 700;
    font-size: 0.92rem;
}

.filter-grid input,
.filter-grid select {
    min-height: 46px;

    padding: 0.7rem 0.85rem;

    border-radius: 13px;

    border:
        1px solid rgba(150, 170, 210, 0.22);

    background:
        rgba(8, 15, 32, 0.85);

    color: #f6f8ff;
}

.filter-grid input:focus,
.filter-grid select:focus {
    border-color: rgba(48, 220, 130, 0.75);

    box-shadow:
        0 0 0 3px rgba(48, 220, 130, 0.12);
}


/* =========================
   FILTER ACTIONS
========================= */

.filter-actions {
    display: flex;
    gap: 0.8rem;

    margin-top: 1.25rem;
}

.filter-actions .btn {
    min-height: 46px;
    padding-inline: 1.2rem;
}


/* =========================
   IMPORT PAGE
========================= */

.upload-box {
    position: relative;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;

    min-height: 260px;

    border-radius: 24px;

    border:
        2px dashed rgba(34, 197, 94, 0.28);

    background:
        rgba(15, 23, 42, 0.55);

    cursor: pointer;

    transition:
        border-color 0.18s ease,
        transform 0.18s ease,
        background 0.18s ease;
}

.upload-box:hover {
    transform: translateY(-2px);

    border-color:
        rgba(34, 197, 94, 0.55);

    background:
        rgba(15, 23, 42, 0.72);
}

.upload-box input {
    position: absolute;
    inset: 0;

    opacity: 0;

    cursor: pointer;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 850px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   DATE INPUT ICON
========================= */

input[type="date"]::-webkit-calendar-picker-indicator {
    filter:
        invert(1)
        brightness(1.4)
        saturate(0)
        opacity(0.85);

    cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* =========================
   IMPORT MAPPING
========================= */

.mapping-form {
    display: grid;
    gap: 1.4rem;
}

.mapping-meta {
    color: #94a3b8;
}

.mapping-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.mapping-grid label {
    display: grid;
    gap: 0.45rem;
}

.required-star {
    color: #22c55e;
    font-weight: 900;
}

.mapping-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

@media (max-width: 1000px) {
    .mapping-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .mapping-grid {
        grid-template-columns: 1fr;
    }
}

.mapping-grid select.auto-detected {
    border-color: rgba(34, 197, 94, 0.62);

    box-shadow:
        0 0 0 3px rgba(34, 197, 94, 0.10),
        0 0 20px rgba(34, 197, 94, 0.08);
}

.auto-detected-label {
    color: #86efac;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.mapping-advanced summary {
    cursor: pointer;
}

.upload-dropzone {
    display: grid;
    gap: 0.6rem;

    padding: 2rem;

    border-radius: 24px;

    background:
        rgba(15, 23, 42, 0.55);

    border:
        2px dashed rgba(148, 163, 184, 0.18);

    text-align: center;

    cursor: pointer;

    transition:
        border-color 0.18s ease,
        transform 0.18s ease;
}

.upload-dropzone:hover {
    border-color:
        rgba(34, 197, 94, 0.42);

    transform:
        translateY(-1px);
}

.upload-icon {
    font-size: 2rem;
}

.upload-title {
    font-size: 1.1rem;
    font-weight: 800;
}

.upload-file-name {
    color: #94a3b8;
    font-size: 0.92rem;
}

.trade-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.trade-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.form-panel {
    padding: 1.4rem;
    border-radius: 22px;
    background: rgba(10, 20, 40, 0.45);
    border: 1px solid rgba(120, 190, 255, 0.12);
}

.form-panel h3 {
    margin-bottom: 1rem;
}

.form-panel label {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1rem;
    color: rgba(230, 238, 255, 0.82);
    font-weight: 600;
}

.form-panel input,
.form-panel select,
.form-panel textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(120, 190, 255, 0.14);
    background: rgba(6, 14, 30, 0.75);
    color: #f3f7ff;
    font: inherit;
}

.form-panel input:focus,
.form-panel select:focus,
.form-panel textarea:focus {
    outline: none;
    border-color: rgba(58, 197, 160, 0.45);
    box-shadow: 0 0 0 3px rgba(58, 197, 160, 0.08);
}

.form-panel-full {
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

@media (max-width: 900px) {
    .trade-form-grid {
        grid-template-columns: 1fr;
    }
}