:root {
    --bg-main: #0a0c10;
    --card-bg: rgba(22, 27, 34, 0.88);
    --orange: #E8932D;
    --orange-glow: rgba(232, 147, 45, 0.38);
    --text-high: #f0f6fc;
    --text-mid: #8b949e;
    --border-color: rgba(232, 147, 45, 0.25);
    --danger: #ef4444;
    --success: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html {
    color-scheme: dark;
}

body {
    background-color: var(--bg-main);
    background-image: radial-gradient(circle at 15% 15%, rgba(232, 147, 45, 0.06) 0%, transparent 40%);
    color: var(--text-high);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 12, 16, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 0.85rem 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.glow-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.block-title {
    font-family: 'Tektur', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--orange);
    margin-bottom: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.72rem 1.2rem;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: #fff;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-orange {
    background: linear-gradient(135deg, #E8932D 0%, #c47317 100%);
    color: #fff;
}

.btn-orange:hover:not(:disabled) {
    filter: brightness(1.08);
    box-shadow: 0 0 14px var(--orange-glow);
}

.btn-border {
    border: 1px solid var(--border-color);
    color: var(--text-high);
    background: rgba(255, 255, 255, 0.05);
}

.btn-border:hover:not(:disabled) {
    border-color: var(--orange);
    color: #fff;
}

.btn-danger-custom {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-danger-custom:hover {
    background: #ef4444;
    color: #fff;
}

.btn-success-custom {
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.4);
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.2s ease;
}

.btn-success-custom:hover {
    background: #10b981;
    color: #fff;
}

.btn-sm {
    padding: 0.32rem 0.65rem;
    font-size: 0.8rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.85rem;
}

input, select, textarea {
    padding: 0.72rem 0.95rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-high);
    width: 100%;
    outline: none;
    font-size: 0.92rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select option {
    background-color: #161b22;
    color: #f0f6fc;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--orange);
    box-shadow: 0 0 10px var(--orange-glow);
}

input[readonly] {
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-mid);
    border-color: rgba(255, 255, 255, 0.1);
}

input:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

input[type="checkbox"] {
    width: 19px;
    height: 19px;
    cursor: pointer;
    accent-color: var(--orange);
}

.user-badge {
    font-size: 0.82rem;
    background: rgba(232, 147, 45, 0.15);
    color: var(--orange);
    border: 1px solid var(--border-color);
    padding: 0.38rem 0.8rem;
    border-radius: 999px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.status-pill-open {
    font-size: 0.78rem;
    background: rgba(232, 147, 45, 0.18);
    color: #fbbf24;
    border: 1px solid rgba(232, 147, 45, 0.45);
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
}

.status-pill-done {
    font-size: 0.78rem;
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.45);
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
}

.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(10, 12, 16, 0.45);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.8rem 0.95rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: middle;
}

th {
    background: rgba(232, 147, 45, 0.1);
    color: var(--orange);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
}

td {
    color: var(--text-high);
    font-size: 0.92rem;
}

.qty-input {
    width: 84px;
    text-align: center;
    padding: 0.42rem;
}

.hidden {
    display: none !important;
}

.field-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-mid);
    margin-bottom: 0.3rem;
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-container > div:last-child {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        margin-top: 0.35rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 560px;
    }

    th, td {
        padding: 0.6rem 0.55rem;
        font-size: 0.84rem;
    }

    select, input, textarea {
        font-size: 0.9rem;
        padding: 0.6rem 0.75rem;
    }
}