:root {
    font-family: Tahoma, "Segoe UI", Arial, sans-serif;
    color-scheme: light;
    --bg: #eef3f7;
    --card: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --line: #dbe3ea;
    --primary: #006c67;
    --primary-hover: #005a56;
    --danger-bg: #fff1f2;
    --danger-text: #b42318;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at 15% 15%, rgba(0, 108, 103, 0.12), transparent 30rem),
        linear-gradient(145deg, #f7fafc 0%, var(--bg) 100%);
    color: var(--text);
}

body {
    min-height: 100vh;
}

.page-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(100%, 440px);
    background: var(--card);
    border: 1px solid rgba(219, 227, 234, 0.9);
    border-radius: 22px;
    padding: 34px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.11);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: var(--primary);
    color: white;
    font-size: 26px;
    font-weight: 700;
    flex: 0 0 auto;
}

.brand-overline {
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}

h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1.45;
}

.subtitle {
    margin: 24px 0 20px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.9;
}

.login-form {
    display: grid;
    gap: 10px;
}

label {
    font-size: 13px;
    font-weight: 700;
    margin-top: 5px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 14px;
    background: #fbfdff;
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 108, 103, 0.12);
}

button {
    min-height: 49px;
    border: 0;
    border-radius: 12px;
    padding: 0 18px;
    margin-top: 12px;
    background: var(--primary);
    color: white;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background 120ms ease, transform 120ms ease;
}

button:hover {
    background: var(--primary-hover);
}

button:active {
    transform: translateY(1px);
}

.alert {
    margin: 0 0 18px;
    border: 1px solid #fecdd3;
    border-radius: 12px;
    padding: 12px 14px;
    background: var(--danger-bg);
    color: var(--danger-text);
    font-size: 13px;
    line-height: 1.8;
}

.footer-note {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
    direction: ltr;
}

.dashboard-card {
    width: min(100%, 540px);
}

.welcome {
    margin: 28px 0 16px;
    padding: 18px;
    border-radius: 14px;
    background: #f1f8f7;
    border: 1px solid #cce2e0;
}

.welcome p {
    margin: 0 0 6px;
    color: var(--muted);
}

.dashboard-panel {
    padding: 20px;
    border: 1px dashed var(--line);
    border-radius: 14px;
    color: var(--muted);
    line-height: 1.9;
}

.secondary-button {
    width: 100%;
    background: #334155;
}

.secondary-button:hover {
    background: #1e293b;
}

@media (max-width: 520px) {
    .page-shell {
        padding: 14px;
    }

    .login-card {
        padding: 24px 20px;
        border-radius: 18px;
    }

    .footer-note {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* Warehouse web conversion */
.app-header {
    min-height: 110px;
    padding: 24px clamp(20px, 5vw, 70px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    background: #111827;
    color: #fff;
}
.app-header h1 { font-size: 25px; margin: 0; }
.app-header p { color: #b7c0ce; margin: 5px 0 0; font-size: 13px; }
.header-overline { color: #85d7d2; }
.header-account { display: flex; align-items: center; gap: 12px; direction: ltr; }
.header-account form { margin: 0; }
.ghost-button { min-height: 38px; margin: 0; background: #334155; padding: 0 15px; }
.warehouse-shell { width: min(1180px, calc(100% - 32px)); margin: 26px auto 50px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px; margin-bottom: 18px; box-shadow: 0 12px 35px rgba(15,23,42,.05); }
.panel-title-row { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.panel-title-row h2 { margin: 0; font-size: 18px; }
.panel-title-row p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.product-form { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr auto; gap: 12px; align-items: end; }
.field-group { display: grid; gap: 6px; }
.field-group label { margin: 0; }
.field-group input, .search-form input { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: #fbfdff; font: inherit; outline: none; }
.field-group input:focus, .search-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,108,103,.1); }
.form-action button { margin: 0; min-height: 44px; white-space: nowrap; }
.list-title-row { align-items: center; }
.search-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search-form input { width: min(280px, 70vw); }
.compact-button { min-height: 44px; width: auto; margin: 0; padding: 0 16px; }
.text-link, .edit-link, .back-link { color: var(--primary); text-decoration: none; font-weight: 700; font-size: 13px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; }
.products-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.products-table th { text-align: right; background: #e9eef5; padding: 13px 15px; font-size: 12px; color: #334155; }
.products-table td { padding: 13px 15px; border-top: 1px solid #eef2f6; font-size: 13px; }
.products-table tbody tr:nth-child(even) { background: #f8fafc; }
.mono-cell { direction: ltr; text-align: right; font-family: Consolas, monospace; }
.actions-cell { display: flex; gap: 12px; align-items: center; }
.actions-cell form { margin: 0; }
.delete-button { min-height: 0; margin: 0; padding: 0; background: transparent; color: #b42318; border-radius: 0; font-size: 13px; }
.delete-button:hover { background: transparent; text-decoration: underline; }
.notice { padding: 12px 15px; border-radius: 11px; margin-bottom: 14px; font-size: 13px; }
.success-notice { background: #ecfdf3; border: 1px solid #abefc6; color: #067647; }
.error-notice { background: #fff1f2; border: 1px solid #fecdd3; color: #b42318; }
.empty-state { text-align: center; color: var(--muted); padding: 40px !important; }
.edit-card { width: min(100%, 520px); }
.immutable-id { margin: 25px 0 15px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; color: var(--muted); font-size: 13px; direction: rtl; }
.immutable-id strong { direction: ltr; unicode-bidi: isolate; color: var(--text); }
.back-link { display: block; text-align: center; margin-top: 16px; }
@media (max-width: 900px) {
    .product-form { grid-template-columns: 1fr 1fr; }
    .form-action { grid-column: 1 / -1; }
    .form-action button { width: 100%; }
}
@media (max-width: 640px) {
    .app-header { align-items: flex-start; flex-direction: column; }
    .product-form { grid-template-columns: 1fr; }
    .list-title-row { flex-direction: column; align-items: stretch; }
    .search-form input { width: 100%; flex: 1; }
    .search-form { align-items: stretch; }
}
