/* ================================================================
   shared.css — Common UI components reused across all pages
   ================================================================ */

/* ─── Dark Surface Card ─── */
.page-card {
    background: #0d0e14;
    border: 1px solid #1f2028;
    border-radius: 16px;
    position: relative;
    /* overflow: hidden; Removed to allow scrolling on large thumbnails */
}

.page-card-header {
    padding: 1.25rem 2rem;
    border-bottom: 1px solid #1f2028;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.page-card-header .back-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #1f2028;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #52525b;
    text-decoration: none;
    flex-shrink: 0;
    transition: all .15s;
}

.page-card-header .back-btn:hover {
    background: #1f2028;
    color: #e4e4e7;
}

.page-card-header .back-btn .material-symbols-outlined {
    font-size: 18px;
}

.page-card-header .header-title {
    font-size: .95rem;
    font-weight: 700;
    color: #fff;
}

.page-card-header .header-sub {
    font-size: .78rem;
    color: #52525b;
}

.page-card-body {
    padding: 2rem;
}

/* ─── Field Label ─── */
.field-label {
    display: block;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #52525b;
    margin-bottom: .5rem;
}

/* ─── Section Title ─── */
.section-title {
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #52525b;
    margin-bottom: 1rem;
}

/* ─── Dark Input ─── */
.dark-input {
    width: 100%;
    background: #0a0b10;
    border: 1px solid #1f2028;
    border-radius: 10px;
    color: #e4e4e7;
    padding: .75rem 1rem;
    font-size: .9rem;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.dark-input:focus {
    border-color: #00bcd4;
    box-shadow: 0 0 0 3px rgba(0, 188, 212, .12);
}

.dark-input::placeholder {
    color: #3f3f46;
}

.input-with-icon {
    position: relative;
}

.input-with-icon .icon-left {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #3f3f46;
    font-size: 20px;
    pointer-events: none;
}

.input-with-icon .dark-input {
    padding-left: 2.8rem;
}

/* ─── Submit / Primary Action Button ─── */
.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    padding: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    cursor: pointer;
    transition: all .2s;
    box-shadow: 0 4px 20px rgba(0, 188, 212, .25);
    margin-top: 1.5rem;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(0, 188, 212, .35);
}

.submit-btn:disabled {
    opacity: .6;
    transform: none;
    cursor: not-allowed;
}

/* ─── Inline Back Link ─── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    color: #52525b;
    font-size: .85rem;
    text-decoration: none;
    transition: color .15s;
    margin-bottom: 1.25rem;
}

.back-link:hover {
    color: #e4e4e7;
}

.back-link .material-symbols-outlined {
    font-size: 18px;
}

/* ─── Section Divider ─── */
.section-divider {
    border: none;
    border-top: 1px solid #1f2028;
    margin: 1.5rem 0;
}

/* ─── Validation Error Banner ─── */
.validation-error {
    background: rgba(239, 68, 68, .1);
    border: 1px solid rgba(239, 68, 68, .2);
    border-radius: 10px;
    color: #ef4444;
    font-size: .85rem;
    padding: .75rem 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* ─── Glow Top Decoration ─── */
.glow-top {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(0, 188, 212, .1) 0%, transparent 70%);
    pointer-events: none;
}

/* ─── Icon Box (small icon inside a rounded square) ─── */
.icon-box-sm {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: #131419;
    border: 1px solid #1f2028;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-box-sm .material-symbols-outlined {
    font-size: 18px;
    color: #00bcd4;
}

/* ─── Status Badge (dot + label pill) ─── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .85rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
}

.status-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.badge-dot-success {
    background: rgba(16, 185, 129, .12);
    color: #10b981;
}

.badge-dot-danger {
    background: rgba(239, 68, 68, .12);
    color: #ef4444;
}

.badge-dot-warning {
    background: rgba(245, 158, 11, .12);
    color: #f59e0b;
}

/* ─── Ghost Icon Button ─── */
.btn-ghost-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #1f2028;
    background: transparent;
    color: #52525b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all .15s;
    cursor: pointer;
}

.btn-ghost-icon:hover {
    background: #1f2028;
    color: #e4e4e7;
    border-color: #3f3f46;
}

.btn-ghost-icon .material-symbols-outlined {
    font-size: 16px;
}

/* ─── Primary Cyan Button ─── */
.btn-primary-cyan {
    background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
    border: none;
    color: #fff;
    padding: .55rem 1.2rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: .88rem;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    text-decoration: none;
    transition: all .2s;
    box-shadow: 0 4px 16px rgba(0, 188, 212, .25);
    cursor: pointer;
}

.btn-primary-cyan:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 188, 212, .35);
    color: #fff;
}

/* ─── Filter / Outline Button ─── */
.btn-filter {
    padding: .5rem 1rem;
    border-radius: 10px;
    border: 1px solid #2a2a32;
    background: #0d0e14;
    color: #71717a;
    font-size: .85rem;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}

.btn-filter:hover {
    border-color: #3f3f46;
    color: #e4e4e7;
}

.btn-filter .material-symbols-outlined {
    font-size: 18px;
}

/* ─── Datatable — dark theme override ─── */
.datatable {
    color: #e4e4e7 !important;
    border-color: #1f2028 !important;
}

.datatable thead th {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #52525b !important;
    border-bottom: 1px solid #1f2028 !important;
    background: transparent !important;
    padding: .75rem 1rem;
    white-space: nowrap;
}

.datatable tbody tr {
    border-bottom: 1px solid #131419 !important;
    background: transparent !important;
    transition: background .12s;
}

.datatable tbody tr:nth-child(odd),
.datatable.table-striped>tbody>tr:nth-of-type(odd)>* {
    background: rgba(255, 255, 255, .018) !important;
    color: #e4e4e7 !important;
}

.datatable tbody tr:hover,
.datatable tr.clickable:hover {
    background: rgba(255, 255, 255, .04) !important;
    cursor: pointer;
}

.datatable tbody td {
    color: #e4e4e7 !important;
    border-color: #131419 !important;
    padding: .85rem 1rem;
    vertical-align: middle;
}

.datatable .sortorder:after {
    content: ' ▲';
    color: #52525b;
    font-size: .65rem;
}

.datatable .sortorder.reverse:after {
    content: ' ▼';
    color: #52525b;
    font-size: .65rem;
}

/* ─── Pagination directive — system theme ─── */
pagination ul.pagination {
    display: flex;
    gap: .3rem;
    list-style: none;
    padding: 0;
    margin: .5rem 0 0;
    justify-content: center;
}

pagination ul.pagination li a,
pagination ul.pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 .6rem;
    border-radius: 8px;
    border: 1px solid #1f2028;
    background: #0d0e14;
    color: #71717a;
    font-size: .82rem;
    font-weight: 500;
    text-decoration: none;
    transition: all .15s;
    cursor: pointer;
}

pagination ul.pagination li a:hover,
pagination ul.pagination li span:hover {
    border-color: #3f3f46;
    color: #e4e4e7;
    background: #1f2028;
}

pagination ul.pagination li.active a,
pagination ul.pagination li.active span {
    background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 188, 212, .3);
}

pagination ul.pagination li.disabled a,
pagination ul.pagination li.disabled span {
    opacity: .35;
    pointer-events: none;
}