/* =====================================================================
   VIVID HIRE STUDIO – Admin panel styles
   ===================================================================== */
:root { --gold: #c9a24b; --gold-light: #e6c77a; --gold-dark: #9c7a2e; --ink: #0b0b0c; --ink-800: #121214; --ink-700: #18181b; --cream: #f4efe6; --ease: cubic-bezier(.22,1,.36,1); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: #2a2a2e; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* login */
.login-bg { background: radial-gradient(ellipse at top, rgba(201,162,75,.12), transparent 60%), var(--ink); }
.login-card { animation: rise .9s var(--ease) both; }
.login-mark { animation: spinIn 1.2s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes spinIn { from { transform: rotate(-180deg) scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* form controls */
.adm-label { display: block; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(244,239,230,.55); margin-bottom: .5rem; }
.adm-input {
    width: 100%; background: var(--ink); border: 1px solid rgba(244,239,230,.1); color: var(--cream);
    padding: .7rem .9rem; font-size: .9rem; border-radius: 6px; outline: none; transition: border-color .25s, box-shadow .25s; color-scheme: dark;
}
.adm-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,75,.15); }
textarea.adm-input { resize: vertical; }
.adm-check { accent-color: var(--gold); width: 16px; height: 16px; }

.adm-btn-gold, .adm-btn-ghost {
    display: inline-flex; align-items: center; gap: .5rem; font-size: .72rem; font-weight: 700;
    letter-spacing: .15em; text-transform: uppercase; padding: .7rem 1.3rem; border-radius: 6px; transition: all .25s;
}
.adm-btn-gold { background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-dark)); color: var(--ink); }
.adm-btn-gold:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(201,162,75,.6); }
.adm-btn-gold:disabled { opacity: .6; cursor: wait; transform: none; }
.adm-btn-ghost { border: 1px solid rgba(244,239,230,.15); color: rgba(244,239,230,.75); }
.adm-btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.adm-btn-ghost:disabled { opacity: .35; pointer-events: none; }

.icon-btn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; color: rgba(244,239,230,.6); border: 1px solid rgba(244,239,230,.08); transition: all .2s; }
.icon-btn:hover { color: var(--gold); border-color: var(--gold); }
.icon-btn.danger:hover { color: #f87171; border-color: #f87171; }

/* sidebar */
.side-link { display: flex; align-items: center; gap: .85rem; padding: .75rem 1rem; border-radius: 8px; font-size: .88rem; color: rgba(244,239,230,.65); transition: all .25s; position: relative; }
.side-link:hover { background: rgba(201,162,75,.07); color: var(--cream); }
.side-link.active { background: linear-gradient(90deg, rgba(201,162,75,.18), rgba(201,162,75,.02)); color: var(--gold); }
.side-link.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--gold); }
#sidebar.open { transform: translateX(0); }

/* cards */
.panel { animation: rise .55s var(--ease) both; }
.adm-card { background: var(--ink-800); border: 1px solid rgba(244,239,230,.06); border-radius: 12px; padding: 1.6rem; }
.adm-h2 { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; font-weight: 600; }
.stat-card { position: relative; overflow: hidden; background: linear-gradient(145deg, var(--ink-700), var(--ink-800)); border: 1px solid rgba(201,162,75,.15); border-radius: 12px; padding: 1.5rem; }
.stat-card::after { content: ''; position: absolute; right: -40px; bottom: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(201,162,75,.2), transparent 70%); }
.stat-label { font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(244,239,230,.5); }
.stat-num { font-family: 'Cormorant Garamond', serif; font-size: 3rem; font-weight: 600; color: var(--gold); line-height: 1.1; margin-top: .4rem; }
.stat-ico { position: absolute; right: 1.3rem; top: 1.2rem; font-size: 1.5rem; opacity: .7; }
.quick-link { display: block; padding: .85rem 1rem; border: 1px solid rgba(244,239,230,.06); border-radius: 8px; font-size: .88rem; color: rgba(244,239,230,.75); transition: all .25s; }
.quick-link:hover { border-color: rgba(201,162,75,.4); color: var(--gold); transform: translateX(4px); }

.adm-tab { padding: .55rem 1.1rem; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; border-radius: 999px; border: 1px solid rgba(244,239,230,.12); color: rgba(244,239,230,.65); transition: all .25s; }
.adm-tab:hover { border-color: var(--gold); color: var(--gold); }
.adm-tab.active { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 700; }

/* tables */
.adm-table { width: 100%; font-size: .87rem; border-collapse: collapse; }
.adm-table th { text-align: left; font-size: .65rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(244,239,230,.4); font-weight: 600; padding: .8rem .8rem; border-bottom: 1px solid rgba(244,239,230,.08); white-space: nowrap; }
.adm-table td { padding: .9rem .8rem; border-bottom: 1px solid rgba(244,239,230,.05); vertical-align: middle; }
.adm-table tbody tr { transition: background .2s; }
.adm-table tbody tr:hover { background: rgba(201,162,75,.04); }
.adm-table tr.row-off td { opacity: .45; }

.price-edit { cursor: pointer; color: var(--gold); font-weight: 700; border-bottom: 1px dashed rgba(201,162,75,.4); white-space: nowrap; }
.price-input { width: 110px; padding: .35rem .5rem; background: var(--ink); border: 1px solid var(--gold); color: var(--cream); border-radius: 4px; }

.switch { position: relative; width: 38px; height: 21px; display: inline-block; cursor: pointer; }
.switch input { display: none; }
.switch span { position: absolute; inset: 0; background: #2a2a2e; border-radius: 21px; transition: .3s; }
.switch span::before { content: ''; position: absolute; width: 15px; height: 15px; left: 3px; top: 3px; background: #888; border-radius: 50%; transition: .3s var(--ease); }
.switch input:checked + span { background: rgba(201,162,75,.35); }
.switch input:checked + span::before { transform: translateX(17px); background: var(--gold); }

.badge { display: inline-block; padding: .25rem .65rem; border-radius: 999px; font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.badge-pending { background: rgba(251,191,36,.12); color: #fbbf24; }
.badge-confirmed { background: rgba(96,165,250,.12); color: #60a5fa; }
.badge-completed { background: rgba(74,222,128,.12); color: #4ade80; }
.badge-cancelled { background: rgba(248,113,113,.12); color: #f87171; }
.status-select { background: var(--ink); border: 1px solid rgba(244,239,230,.1); color: var(--cream); padding: .35rem .5rem; border-radius: 6px; font-size: .8rem; color-scheme: dark; }

/* images */
.img-preview { position: relative; overflow: hidden; border-radius: 8px; background: var(--ink); border: 1px dashed rgba(244,239,230,.15); display: flex; align-items: center; justify-content: center; }
.img-preview img { width: 100%; height: 100%; object-fit: cover; animation: fadeIn .6s; }
.img-preview .no-img { color: rgba(244,239,230,.3); font-size: .8rem; }
.bg-checker { background-image: linear-gradient(45deg,#1a1a1d 25%,transparent 25%),linear-gradient(-45deg,#1a1a1d 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#1a1a1d 75%),linear-gradient(-45deg,transparent 75%,#1a1a1d 75%); background-size: 20px 20px; background-position: 0 0,0 10px,10px -10px,-10px 0; }
.bg-checker img { object-fit: contain; padding: 1rem; }
@keyframes fadeIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.upload-progress { height: 4px; background: rgba(244,239,230,.1); border-radius: 4px; overflow: hidden; }
.img-preview .upload-progress { position: absolute; left: 1rem; right: 1rem; bottom: 1rem; }
.upload-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); transition: width .2s; }

.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 140px; border: 2px dashed rgba(201,162,75,.3); border-radius: 10px; cursor: pointer; padding: 1rem; color: rgba(244,239,230,.6); transition: all .25s; }
.dropzone:hover, .dropzone.drag { border-color: var(--gold); background: rgba(201,162,75,.05); }

.g-card { background: var(--ink-800); border: 1px solid rgba(244,239,230,.06); border-radius: 10px; overflow: hidden; animation: rise .5s var(--ease) both; }
.g-card .g-img { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.g-card .g-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.g-card:hover .g-img img { transform: scale(1.06); }
.g-card .g-cat { position: absolute; top: .6rem; left: .6rem; }
.g-card .adm-input { padding: .5rem .7rem; font-size: .82rem; }

.icon-opt { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(244,239,230,.12); border-radius: 8px; color: rgba(244,239,230,.6); cursor: pointer; transition: all .2s; }
.icon-opt:hover { border-color: var(--gold); color: var(--gold); }
.icon-opt:has(input:checked) { background: var(--gold); border-color: var(--gold); color: var(--ink); }

/* modal */
.modal { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.7); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; visibility: hidden; transition: all .3s; }
.modal.open { opacity: 1; visibility: visible; }
.modal-box { width: 100%; max-width: 720px; background: var(--ink-800); border: 1px solid rgba(201,162,75,.25); border-radius: 14px; transform: translateY(30px) scale(.97); transition: transform .4s var(--ease); }
.modal.open .modal-box { transform: none; }

/* toast */
.adm-toast { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 80; padding: .9rem 1.3rem; border-radius: 8px; background: var(--ink-700); border-left: 3px solid var(--gold); color: var(--cream); font-size: .88rem; box-shadow: 0 15px 40px rgba(0,0,0,.5); transform: translateX(130%); visibility: hidden; transition: transform .45s var(--ease), visibility .45s; max-width: 90vw; }
.adm-toast.show { transform: none; visibility: visible; }
.adm-toast.error { border-color: #f87171; }

.skeleton-row td { position: relative; }
.skeleton-line { height: 12px; border-radius: 6px; background: linear-gradient(90deg,#18181b 25%,#232327 37%,#18181b 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; }
@keyframes sk { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
