/* path: client/css/style.css */

:root {
    color-scheme: dark;
    --bg: #050509;
    --bg-elevated: #101018;
    --bg-elevated-soft: #161624;
    --border-subtle: #2a2a3c;
    --accent: #3b82f6;
    --accent-soft: rgba(59, 130, 246, 0.12);
    --accent-text: #e5f0ff;
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --danger: #f97373;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #111827 0, #020617 55%, #000 100%);
    color: var(--text-main);
    min-height: 100vh;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(5, 5, 12, 0.9);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header .brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

header .brand span {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

header a {
    color: var(--accent-text);
    text-decoration: none;
    font-size: 0.9rem;
}

main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 16px 12px 40px;
}

.card {
    border-radius: 16px;
    background: radial-gradient(circle at top left, #1f2937 0, #020617 55%);
    border: 1px solid rgba(148, 163, 184, 0.18);
    padding: 16px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.7);
}

h1,
h2,
h3 {
    margin: 0 0 10px;
    font-weight: 600;
}

h1 {
    font-size: 1.4rem;
}

h2 {
    font-size: 1.2rem;
}

.muted {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.list {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.list-item {
    border-radius: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(75, 85, 99, 0.6);
    background: linear-gradient(120deg, #020617 0, #030712 60%, #020617 100%);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.list-item:hover {
    border-color: var(--accent);
    background: linear-gradient(120deg, #020617 0, #111827 50%, #020617 100%);
    transform: translateY(-1px);
}

.item-title {
    font-size: 0.98rem;
}

.item-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.pill {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.7);
    color: var(--text-muted);
}

.pill-accent {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-text);
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.breadcrumbs {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.breadcrumbs span {
    cursor: pointer;
}

.breadcrumbs span:hover {
    color: var(--accent-text);
}

.btn {
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: radial-gradient(circle at top, #1f2937 0, #020617 80%);
    color: var(--text-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.btn:hover {
    border-color: var(--accent);
    background: radial-gradient(circle at top, #1e293b 0, #020617 80%);
    transform: translateY(-0.5px);
}

.loading,
.error,
.empty {
    margin-top: 16px;
    font-size: 0.9rem;
}

.loading {
    color: var(--text-muted);
}

.error {
    color: var(--danger);
}

.empty {
    color: var(--text-muted);
    font-style: italic;
}

a.link {
    color: var(--accent-text);
    text-decoration: none;
    border-bottom: 1px dotted rgba(129, 140, 248, 0.7);
}

a.link:hover {
    border-bottom-style: solid;
}

/* Header / Nav */
.nav-main-link {
    margin-right: 1rem;
}

/* Buttons */
.btn-logout {
    padding: 7px 14px;
    border-radius: 6px;
    background: #222;
    font-weight: 600;
}

.btn-logout:hover {
    background: #333;
}

/* Login form */

.form-error {
    margin-bottom: 1rem;
}

/* Payment popup */

.payment-popup {
    max-width: 480px;
    width: 100%;
}

.payment-items {
    max-height: 260px;
    overflow: auto;
    margin-top: 8px;
    margin-bottom: 8px;
}

.payment-item-main {
    flex: 1;
}

.payment-summary {
    margin-top: 8px;
    margin-bottom: 8px;
}

.payment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

/* Basit margin utility (başka yerlerde de kullanacağız) */
.mt-8 {
    margin-top: 8px;
}

/* Spacing utility sınıfları */
.mt-2 {
    margin-top: 2px;
}

.mt-4 {
    margin-top: 4px;
}

.mt-6 {
    margin-top: 6px;
}

.mt-8 {
    margin-top: 8px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-16 {
    margin-top: 16px;
}

.mb-4 {
    margin-bottom: 4px;
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-12 {
    margin-bottom: 12px;
}

.mb-16 {
    margin-bottom: 16px;
}

.ml-8 {
    margin-left: 8px;
}

/* === TableDetail içindeki satır görünümü === */
.order-item-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.pill-paid {
    margin-left: 8px;
}

.item-sub-small {
    font-size: 0.8rem;
}

.qty-value {
    margin: 0 6px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.table-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Buton ikonları (zaten kullanıyorsun) */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* === Popup genel stilleri (sipariş ekleme / ödeme) === */
.popup-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 998;
}

/* Küçük/orta boy popup’lar için temel stil (ödeme popup’ı vs) */
.popup {
    background: #020617;
    border-radius: 12px;
    padding: 20px;
    min-width: 280px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Büyük popup (sipariş ekleme) */
.popup-large {
    padding: 0;
    width: 90%;
    max-width: 960px;
    height: 90%;
    max-height: 640px;
    display: flex;
    flex-direction: column;
}

/* Popup header / body / iframe */
.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.popup-subtitle {
    font-size: 0.8rem;
}

.popup-body {
    flex: 1;
    min-height: 0;
}

.popup-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #020617;
    border-radius: 0 0 12px 12px;
}

/* Ödeme popup içi başlık, metin, buton grubu */
.popup-title {
    margin-top: 0;
    margin-bottom: 8px;
}

.popup-text {
    margin: 0 0 8px 0;
}

.popup-subtext {
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.popup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

/* ProductDetail breadcrumb & info kutuları */

.breadcrumb-link {
    cursor: pointer;
}

/* Ürün / SKU / Slot bilgi kutuları */
.info-box {
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: #020617;
}

.info-box-title {
    font-size: 0.9rem;
    font-weight: 600;
}

.info-box-sub {
    font-size: 0.75rem;
    margin-bottom: 4px;
}

/* Modifiye seçenek satırları */
.modifier-option-label {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* "Ham JSON'u göster" summary linki */
.details-toggle {
    font-size: 0.75rem;
    cursor: pointer;
}

/* JSON gösteren <pre> alanı */
.code-block {
    background: #020617;
    padding: 8px;
    border-radius: 6px;
    max-height: 220px;
    overflow: auto;
    font-size: 0.75rem;
}
