/* ==============================
   RESET & BASE
============================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0a1e 0%, #020617 50%, #0a0a0f 100%);
    color: #e5e7eb;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

a { color: inherit; }

/* ==============================
   LAYOUT
============================== */
.page-center {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.sidebar {
    width: 240px;
    min-width: 240px;
    background: rgba(8, 8, 16, 0.95);
    border-right: 1px solid rgba(255,255,255,0.06);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.app-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.content-shell {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

/* ==============================
   SIDEBAR
============================== */
.logo {
    font-weight: 800;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    color: #818cf8;
    margin-bottom: 8px;
}

.logo span {
    color: #c4b5fd;
}

.active-app {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: #64748b;
    text-transform: uppercase;
    padding: 6px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar nav {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 12px 0;
}

.nav-section-label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #475569;
    padding: 8px 0;
}

.nav-item {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 2px;
    transition: all 0.15s ease;
}

.nav-item:hover {
    background: rgba(99,102,241,0.1);
    color: #e2e8f0;
}

.nav-item.active {
    background: rgba(99,102,241,0.15);
    color: #a5b4fc;
}

/* Submenu for quick links */
.nav-submenu {
    padding: 4px 0 8px 12px;
    margin-bottom: 4px;
    border-left: 2px solid rgba(99,102,241,0.3);
    margin-left: 16px;
}

.nav-subitem {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    color: #8b8fa3;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
}

.nav-subitem:hover {
    background: rgba(99,102,241,0.1);
    color: #c4b5fd;
}

.nav-subitem.active {
    background: rgba(99,102,241,0.15);
    color: #a5b4fc;
}

.nav-subitem .subitem-icon {
    font-size: 0.9rem;
    opacity: 0.8;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-footer .nav-item.logout {
    color: #f87171;
}

.sidebar-footer .nav-item.logout:hover {
    background: rgba(248,113,113,0.1);
}

/* ==============================
   CARD
============================== */
.card {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    width: 100%;
    max-width: 420px;
    padding: 32px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* ==============================
   TYPOGRAPHY
============================== */
h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
    color: #f8fafc;
}

h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #f1f5f9;
}

.subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 24px;
}

.text-muted {
    color: #64748b;
}

/* ==============================
   FORMS
============================== */
.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #94a3b8;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 0.95rem;
    background: rgba(0,0,0,0.3);
    color: #e5e7eb;
    transition: all 0.15s ease;
}

input::placeholder,
textarea::placeholder {
    color: #4b5563;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(0,0,0,0.4);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

/* ==============================
   BUTTONS
============================== */
button, .btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
}

button:hover, .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(99,102,241,0.3);
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: #94a3b8;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.05);
    color: #e5e7eb;
    box-shadow: none;
    transform: none;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

/* ==============================
   PAGE HEADER
============================== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    gap: 20px;
}

/* ==============================
   USERS GRID
============================== */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.user-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.user-card:hover {
    border-color: rgba(99,102,241,0.3);
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.user-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.user-avatar-lg {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    color: #f1f5f9;
    font-size: 0.95rem;
}

.user-email {
    font-size: 0.8rem;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-card-body {
    padding: 16px;
}

.user-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.meta-label {
    color: #64748b;
}

.meta-value {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ==============================
   BADGES
============================== */
.status-badge {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.status-badge.status-active {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.status-badge.status-inactive {
    background: rgba(100, 116, 139, 0.15);
    color: #94a3b8;
}

.role-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(100, 116, 139, 0.15);
    color: #94a3b8;
    font-weight: 500;
}

.role-badge.role-admin {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
}

.app-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
}

/* ==============================
   FORM PAGE
============================== */
.form-page {
    display: flex;
    justify-content: center;
}

.form-container {
    width: 100%;
    max-width: 560px;
}

.form-header {
    margin-bottom: 24px;
}

.back-link {
    display: inline-block;
    color: #64748b;
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

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

.form-body {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    overflow: hidden;
}

.form-section {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    margin-bottom: 14px;
}

.section-desc {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 14px;
}

.label-hint {
    font-weight: 400;
    color: #64748b;
    text-transform: none;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 16px 20px;
    background: rgba(0,0,0,0.2);
}

/* ==============================
   TOGGLE
============================== */
.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.04);
}

.toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toggle-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e5e7eb;
    text-transform: none;
}

.toggle-desc {
    font-size: 0.8rem;
    color: #64748b;
}

.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #334155;
    border-radius: 24px;
    transition: all 0.2s;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #94a3b8;
    border-radius: 50%;
    transition: all 0.2s;
}

.toggle input:checked + .toggle-slider {
    background: #6366f1;
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: white;
}

/* ==============================
   APP SELECT
============================== */
.app-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.app-select-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 14px;
    background: rgba(0,0,0,0.2);
    border: 2px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: none;
}

.app-select-card:hover {
    border-color: rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.3);
}

.app-select-card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.app-select-card:has(input:checked) {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

.app-select-card:has(input:checked) .app-select-content {
    color: #a5b4fc;
}

.app-select-card:has(input:checked) .app-select-check {
    opacity: 1;
    transform: scale(1);
}

.app-select-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
}

.app-select-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-select-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.app-select-check {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #6366f1;
    border-radius: 50%;
    color: white;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s;
}

/* ==============================
   APP SWITCH
============================== */
.app-switch-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.app-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    text-decoration: none;
    transition: all 0.2s ease;
}

.app-tile:hover {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(99,102,241,0.3);
    transform: translateY(-2px);
}

.app-tile-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.12);
    border-radius: 10px;
    color: #a5b4fc;
}

.app-tile-content {
    flex: 1;
}

.app-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f1f5f9;
}

.app-desc {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2px;
}

.app-arrow {
    color: #6366f1;
    font-size: 1.2rem;
}

/* ==============================
   EMPTY STATE
============================== */
.empty-state-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    color: #6366f1;
}

.empty-state-card h3 {
    margin-bottom: 8px;
}

.empty-state-card .btn {
    margin-top: 20px;
}

/* ==============================
   FORM CARDS (Form App)
============================== */
.form-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.form-card:hover {
    border-color: rgba(99,102,241,0.3);
    transform: translateY(-2px);
}

.form-card .btn {
    padding: 8px 14px;
    font-size: 0.8rem;
    margin-left: 8px;
}

/* ==============================
   DATA TABLE
============================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
    overflow: hidden;
}

.data-table thead {
    background: rgba(0,0,0,0.3);
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
}

.data-table th {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    font-weight: 600;
}

.data-table tbody tr {
    border-top: 1px solid rgba(255,255,255,0.04);
}

.data-table tbody tr:hover {
    background: rgba(99,102,241,0.05);
}

/* ==============================
   ERROR
============================== */
.error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 16px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ==============================
   CHECKBOX ROW
============================== */
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.checkbox-row input[type="checkbox"] {
    width: auto;
    padding: 0;
    accent-color: #6366f1;
}

.checkbox-row label {
    display: inline;
    margin-bottom: 0;
    text-transform: none;
    font-size: 0.9rem;
    color: #e5e7eb;
}

/* ==============================
   DIVIDER
============================== */
.divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 24px 0;
}

/* ==============================
   STATS GRID
============================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.stat-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.stat-icon-primary {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
}

.stat-icon-success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.stat-icon-purple {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 4px;
}

/* ==============================
   SECTION HEADER
============================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h3 {
    margin-bottom: 0;
}

/* ==============================
   USER TABLE CELLS
============================== */
.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.user-name-sm {
    font-weight: 600;
    color: #f1f5f9;
    font-size: 0.9rem;
}

.user-email-sm {
    font-size: 0.75rem;
    color: #64748b;
}

.users-table-wrapper {
    overflow-x: auto;
}

/* ==============================
   USER CARD ACTIONS
============================== */
.user-card-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.04);
}

.user-card-inactive {
    opacity: 0.7;
}

.user-card-inactive .user-avatar-lg {
    background: linear-gradient(135deg, #475569, #64748b);
}

.inline-form {
    display: inline;
}

/* ==============================
   BUTTON VARIANTS
============================== */
.btn-warning {
    border-color: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.btn-warning:hover {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.5);
}

.btn-success {
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.btn-success:hover {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.5);
}

.btn-danger {
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.5);
}

/* ==============================
   FORMS LIST (Form App)
============================== */
.forms-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-card-lg {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.form-card-lg:hover {
    border-color: rgba(99,102,241,0.3);
}

.form-card-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.form-card-title h3 {
    margin-bottom: 6px;
}

.form-public-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #6366f1;
    text-decoration: none;
}

.form-public-link:hover {
    color: #818cf8;
}

.form-card-meta {
    display: flex;
    gap: 8px;
    font-size: 0.85rem;
}

.form-card-actions {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.04);
}

/* ==============================
   TWO COLUMN LAYOUT
============================== */
.two-column-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .two-column-layout {
        grid-template-columns: 1fr;
    }
}

.column-sidebar {
    position: sticky;
    top: 40px;
    align-self: start;
}

.column-main {
    min-width: 0;
}

.sidebar-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 20px;
}

.sidebar-card h3 {
    margin-bottom: 16px;
}

/* ==============================
   FIELDS LIST
============================== */
.fields-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    gap: 12px;
}

.field-info {
    flex: 1;
    min-width: 0;
}

.field-label {
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 4px;
}

.field-meta {
    display: flex;
    gap: 8px;
    font-size: 0.8rem;
}

.field-type {
    color: #64748b;
    text-transform: capitalize;
}

.field-required {
    color: #f87171;
}

/* ==============================
   HEADER ACTIONS
============================== */
.header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ==============================
   PUBLIC LINK DISPLAY
============================== */
.public-link-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
}

.public-link-display code {
    flex: 1;
    font-size: 0.85rem;
    color: #a5b4fc;
    word-break: break-all;
}

/* ==============================
   TABLE UTILITIES
============================== */
.nowrap {
    white-space: nowrap;
}

.submissions-table-wrapper {
    overflow-x: auto;
}

/* ==============================
   FILTER BAR
============================== */
.filter-bar {
    background: linear-gradient(165deg, rgba(35,40,55,0.98), rgba(25,30,40,0.98));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 140px;
}

.filter-group label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.5);
    margin: 0;
}

.filter-group select,
.filter-group input[type="date"] {
    height: 38px;
    padding: 0 12px;
    font-size: 0.85rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
}

.filter-group select:hover,
.filter-group input[type="date"]:hover {
    border-color: rgba(99,102,241,0.4);
}

.filter-group select:focus,
.filter-group input[type="date"]:focus {
    outline: none;
    border-color: rgba(99,102,241,0.6);
}

.filter-group input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.clear-filters {
    margin-left: auto;
}

@media (max-width: 768px) {
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .clear-filters {
        margin-left: 0;
        margin-top: 8px;
    }
}

/* ==============================
   SUBMISSIONS LIST (Card Layout)
============================== */
.submissions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.submission-card {
    background: linear-gradient(165deg, rgba(35,40,55,0.98), rgba(25,30,40,0.98));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.2s ease;
    position: relative;
}

.submission-card:hover {
    border-color: rgba(99,102,241,0.4);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.submission-card.urgent {
    border-left: 4px solid #ef4444;
}

.submission-card.priority {
    border-left: 4px solid #f59e0b;
}

.submission-card-link {
    display: block;
    padding: 18px 20px;
    text-decoration: none;
    color: inherit;
}

.submission-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.submission-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.submission-date {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
}

.submission-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.client-tag {
    padding: 4px 10px;
    background: rgba(16,185,129,0.15);
    color: #10b981;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.scheduled-tag {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
}

.notes-badge {
    padding: 4px 8px;
    background: rgba(99,102,241,0.15);
    color: #a5b4fc;
    border-radius: 6px;
    font-size: 0.8rem;
}

.submission-card-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.field-preview {
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 10px 12px;
    overflow: hidden;
}

.field-preview-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.4);
    margin-bottom: 4px;
}

.field-preview-value {
    display: block;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.more-fields {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99,102,241,0.1);
    border: 1px dashed rgba(99,102,241,0.3);
}

.more-fields-text {
    font-size: 0.8rem;
    color: rgba(99,102,241,0.8);
}

.submission-card-actions {
    position: absolute;
    top: 18px;
    right: 20px;
    opacity: 0;
    transition: opacity 0.2s;
}

.submission-card:hover .submission-card-actions {
    opacity: 1;
}

/* ==============================
   EMPTY STATE INLINE
============================== */
.empty-state-inline {
    padding: 40px 20px;
    text-align: center;
    background: rgba(15, 23, 42, 0.3);
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: 10px;
}

/* ==============================
   FORM CARD ENHANCEMENTS
============================== */
.form-card-inactive {
    opacity: 0.7;
}

.form-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.form-title-row h3 {
    margin-bottom: 0;
}

.form-description {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 8px;
    line-height: 1.4;
}

.form-card-stats {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.stat-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-mini-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
}

.stat-mini-label {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==============================
   FIELD REORDERING
============================== */
.field-reorder {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-right: 12px;
}

.reorder-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border: none;
    border-radius: 4px;
    color: #94a3b8;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.reorder-btn:hover:not(.disabled) {
    background: rgba(99,102,241,0.2);
    color: #a5b4fc;
}

.reorder-btn.disabled {
    opacity: 0.3;
    cursor: default;
}

.field-actions {
    display: flex;
    gap: 6px;
}

.field-options-count {
    color: #6366f1;
    font-size: 0.75rem;
}

/* ==============================
   LOGO UPLOAD
============================== */
.logo-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    margin-bottom: 16px;
}

.logo-image {
    max-width: 100px;
    max-height: 100px;
    border-radius: 8px;
    object-fit: contain;
}

.file-input {
    padding: 10px;
    background: rgba(0,0,0,0.2);
    border: 1px dashed rgba(255,255,255,0.15);
    border-radius: 8px;
    cursor: pointer;
}

.file-input:hover {
    border-color: rgba(99,102,241,0.5);
}

.input-hint {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 6px;
}

/* ==============================
   PUBLIC FORM LOGO
============================== */
.form-logo {
    text-align: center;
    margin-bottom: 28px;
}

.form-logo img {
    max-width: 220px;
    max-height: 100px;
    border-radius: 12px;
    object-fit: contain;
    padding: 16px 24px;
    background: white;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* ==============================
   SUBMISSION DETAIL
============================== */
.submission-detail-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    overflow: hidden;
}

.submission-field {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.submission-field:last-child {
    border-bottom: none;
}

.submission-field-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.submission-field-value {
    font-size: 0.95rem;
    color: #f1f5f9;
    line-height: 1.5;
}

.submission-textarea {
    font-family: inherit;
    font-size: 0.95rem;
    color: #f1f5f9;
    background: rgba(0,0,0,0.2);
    padding: 12px;
    border-radius: 6px;
    white-space: pre-wrap;
    margin: 0;
}

.submission-link {
    color: #a5b4fc;
    text-decoration: none;
}

.submission-link:hover {
    text-decoration: underline;
}

/* ==============================
   TABLE ENHANCEMENTS
============================== */
.actions-col {
    width: 140px;
    text-align: right;
}

.truncate-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.repeatable-summary {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(99,102,241,0.1));
    color: #a5b4fc;
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

/* ==============================
   BUTTON DANGER SOLID
============================== */
.btn-danger:not(.btn-secondary) {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border: none;
    color: white;
}

.btn-danger:not(.btn-secondary):hover {
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.3);
}

/* ==============================
   FORM ROW (side by side)
============================== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ==============================
   WORK DAYS GRID
============================== */
.work-days-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.day-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 40px;
    background: rgba(0,0,0,0.2);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.day-checkbox input {
    display: none;
}

.day-checkbox:has(input:checked) {
    background: rgba(99, 102, 241, 0.2);
    border-color: #6366f1;
    color: #a5b4fc;
}

.day-checkbox span {
    color: #94a3b8;
}

.day-checkbox:has(input:checked) span {
    color: #a5b4fc;
}

/* ==============================
   INFO BOX
============================== */
.info-box {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 0.85rem;
    color: #a5b4fc;
    line-height: 1.6;
    margin-top: 16px;
}

.info-box strong {
    color: #c4b5fd;
}

/* ==============================
   RESPONSE TIME BOX (success page)
============================== */
.response-time-box {
    margin-top: 24px;
    padding: 16px 24px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
}

.response-time-box p {
    margin: 0;
}

.response-time-box.working-hours {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.response-time-box.outside-hours {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
}

.response-time-box.urgent {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

/* ==============================
   URGENT OPTION (public form)
============================== */
.urgent-option {
    margin: 24px 0;
    padding: 16px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 10px;
}

.urgent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.urgent-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: #f59e0b;
    cursor: pointer;
}

.urgent-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.urgent-label strong {
    color: #fbbf24;
    font-size: 0.95rem;
}

.urgent-label small {
    color: #94a3b8;
    font-size: 0.8rem;
    line-height: 1.4;
}

/* ==============================
   URGENT TAG (submissions table)
============================== */
.urgent-tag {
    display: inline-block;
    background: #f59e0b;
    color: #1c1c24;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
    margin-right: 8px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.urgent-row {
    background: rgba(245, 158, 11, 0.05);
}

.urgent-row:hover {
    background: rgba(245, 158, 11, 0.1);
}

/* ==============================
   PRIORITY FLAG
============================== */
.priority-flag {
    display: inline-block;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
    margin-right: 8px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.priority-row {
    background: rgba(239, 68, 68, 0.05);
}

.priority-row:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ==============================
   STATUS BADGES
============================== */
.status-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-badge.status-new {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
}

.status-badge.status-reviewed {
    background: rgba(234, 179, 8, 0.15);
    color: #fbbf24;
}

.status-badge.status-quoted {
    background: rgba(168, 85, 247, 0.15);
    color: #c4b5fd;
}

.status-badge.status-accepted {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.status-badge.status-in_progress {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}

.status-badge.status-completed {
    background: rgba(34, 197, 94, 0.25);
    color: #22c55e;
}

.status-badge.status-declined {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* Invoice status badges */
.status-badge.status-draft {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
}

.status-badge.status-sent {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.status-badge.status-paid {
    background: rgba(34, 197, 94, 0.25);
    color: #22c55e;
}

.status-badge.status-cancelled {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* Notes Badge */
.notes-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    border-radius: 10px;
    padding: 0 6px;
}

/* Client Link */
.client-link {
    color: #a5b4fc;
    text-decoration: none;
    font-weight: 500;
}

.client-link:hover {
    color: #c4b5fd;
    text-decoration: underline;
}

/* ==============================
   RATING BADGES
============================== */
.rating-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.rating-badge.rating-good {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.rating-badge.rating-neutral {
    background: rgba(234, 179, 8, 0.2);
    color: #fbbf24;
}

.rating-badge.rating-bad {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.rating-badge.rating-none {
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
}

/* ==============================
   CLIENT STYLES
============================== */
.search-bar {
    margin-bottom: 24px;
}

.search-bar form {
    display: flex;
    gap: 8px;
}

.search-bar input {
    flex: 1;
    max-width: 300px;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.client-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 20px;
}

.client-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.client-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e2e8f0;
}

.client-info {
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #94a3b8;
}

.client-company {
    color: #cbd5e1;
    margin-bottom: 4px;
}

.client-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: #94a3b8;
}

.client-stats strong {
    color: #e2e8f0;
}

.client-actions {
    display: flex;
    gap: 8px;
}

/* Client detail layout */
.client-detail-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .client-detail-layout {
        grid-template-columns: 1fr;
    }
}

.client-sidebar .sidebar-card {
    margin-bottom: 16px;
}

.contact-info .contact-item {
    margin-bottom: 12px;
}

.contact-item .contact-label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.contact-item a {
    color: #a5b4fc;
}

.stats-list .stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.stats-list .stat-row:last-child {
    border-bottom: none;
}

.quick-rate-buttons {
    display: flex;
    gap: 8px;
}

.rate-btn {
    flex: 1;
    padding: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.rate-btn.rate-good {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.2);
}

.rate-btn.rate-good.active, .rate-btn.rate-good:hover {
    background: rgba(34, 197, 94, 0.25);
}

.rate-btn.rate-neutral {
    background: rgba(234, 179, 8, 0.1);
    color: #fbbf24;
    border-color: rgba(234, 179, 8, 0.2);
}

.rate-btn.rate-neutral.active, .rate-btn.rate-neutral:hover {
    background: rgba(234, 179, 8, 0.25);
}

.rate-btn.rate-bad {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.2);
}

.rate-btn.rate-bad.active, .rate-btn.rate-bad:hover {
    background: rgba(239, 68, 68, 0.25);
}

.client-notes {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* Job history */
.job-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.job-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 16px;
}

.job-header {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.job-title {
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 4px;
}

.job-date {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 8px;
}

.job-details {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 12px;
}

.job-quote {
    color: #4ade80;
    font-weight: 600;
}

/* Rating options */
.rating-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rating-option {
    cursor: pointer;
}

.rating-option input {
    display: none;
}

.rating-option .rating-badge {
    cursor: pointer;
    transition: all 0.15s ease;
    opacity: 0.6;
}

.rating-option input:checked + .rating-badge,
.rating-option:hover .rating-badge {
    opacity: 1;
    transform: scale(1.05);
}

/* ==============================
   SUBMISSION MANAGEMENT LAYOUT
============================== */
.submission-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .submission-layout {
        grid-template-columns: 1fr;
    }
}

.submission-sidebar .sidebar-card {
    margin-bottom: 16px;
}

.submission-sidebar .sidebar-card h3 {
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-select {
    width: 100%;
    padding: 10px 12px;
    font-weight: 600;
}

.quote-display {
    margin-bottom: 12px;
}

.quote-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4ade80;
}

.quote-form .quote-input-row {
    display: flex;
    gap: 8px;
}

.quote-form .currency-select {
    width: 80px;
}

.quote-form input[type="number"] {
    flex: 1;
}

.scheduled-display {
    font-weight: 600;
    color: #a5b4fc;
    margin-bottom: 12px;
}

/* Linked client */
.linked-client {
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
    padding: 12px;
}

.linked-client .client-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.linked-client .client-company {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 8px;
}

.client-link-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.or-divider {
    text-align: center;
    color: #64748b;
    font-size: 0.8rem;
    margin: 12px 0;
    position: relative;
}

.or-divider::before,
.or-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: rgba(255,255,255,0.1);
}

.or-divider::before { left: 0; }
.or-divider::after { right: 0; }

/* Submission data card */
.submission-data-card,
.submission-notes-card,
.activity-log-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.submission-data-card h3,
.submission-notes-card h3,
.activity-log-card h3 {
    margin-bottom: 16px;
    font-size: 1rem;
    color: #e2e8f0;
}

.field-list .field-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative;
}

.field-list .field-item:last-child {
    border-bottom: none;
}

.field-label {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.field-value {
    color: #e2e8f0;
}

.field-textarea {
    background: rgba(0,0,0,0.2);
    padding: 12px;
    border-radius: 6px;
    font-family: inherit;
    white-space: pre-wrap;
    margin: 0;
}

.edit-field-btn {
    position: absolute;
    right: 0;
    top: 12px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: #94a3b8;
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
}

.edit-field-btn:hover {
    border-color: #6366f1;
    color: #a5b4fc;
}

.edit-field-form {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.edit-field-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

/* Notes section */
.add-note-form {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.add-note-form textarea {
    flex: 1;
}

.notes-list .note-item {
    padding: 12px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    margin-bottom: 8px;
}

.note-content {
    color: #e2e8f0;
    margin-bottom: 8px;
    white-space: pre-wrap;
}

.note-date {
    font-size: 0.75rem;
    color: #64748b;
}

/* Activity log */
.activity-list .activity-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.85rem;
}

.activity-list .activity-item:last-child {
    border-bottom: none;
}

.activity-action {
    color: #94a3b8;
}

.activity-date {
    color: #64748b;
}

/* Button warning style */
.btn-warning {
    background: rgba(245, 158, 11, 0.2) !important;
    border-color: #f59e0b !important;
    color: #fbbf24 !important;
}

/* ==============================
   STORAGEOS - Dashboard
============================== */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.dashboard-card {
    background: rgba(30, 27, 75, 0.4);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    padding: 24px;
}

.dashboard-card h3 {
    margin: 0 0 20px 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
}

.stats-row {
    display: flex;
    gap: 24px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #e2e8f0;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    margin-top: 4px;
}

.stat-item.stat-in .stat-value { color: #4ade80; }
.stat-item.stat-out .stat-value { color: #f87171; }
.stat-positive { color: #4ade80 !important; }
.stat-warning { color: #fbbf24 !important; }

.capacity-bar {
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 16px 0 8px 0;
}

.capacity-bar.large {
    height: 12px;
    margin: 12px 0;
}

.capacity-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.capacity-text {
    font-size: 0.8rem;
    color: #94a3b8;
    text-align: center;
}

.alert-badge {
    display: inline-block;
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 12px;
}

.dashboard-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-header-row h3 {
    margin: 0;
}

/* Transaction List */
.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
}

.type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.type-badge.type-in {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.type-badge.type-out {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.type-badge.type-storage {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

.transaction-info {
    flex: 1;
}

.transaction-client {
    font-weight: 500;
    color: #e2e8f0;
}

.transaction-details {
    font-size: 0.8rem;
    color: #64748b;
}

.transaction-cost {
    font-weight: 600;
    color: #a5b4fc;
}

/* Top Clients */
.top-clients-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top-client-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
}

.client-name {
    font-weight: 500;
    color: #e2e8f0;
}

.client-revenue {
    font-weight: 600;
    color: #4ade80;
}

/* Dashboard Alert Card */
.dashboard-alert {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.aging-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.aging-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 16px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
}

.aging-client {
    color: #94a3b8;
}

.aging-days {
    color: #fbbf24;
    font-weight: 600;
}

/* Quick Actions */
.quick-actions-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 32px;
    background: rgba(30, 27, 75, 0.3);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    text-decoration: none;
    color: #e2e8f0;
    transition: all 0.2s ease;
}

.quick-action-card:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.quick-action-icon {
    font-size: 2rem;
}

.quick-action-label {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ==============================
   STORAGEOS - Warehouse Map
============================== */
.map-legend {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(30, 27, 75, 0.3);
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #94a3b8;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-empty { background: #374151; }
.legend-partial { background: #6366f1; }
.legend-full { background: #22c55e; }
.legend-blocked { background: #ef4444; }
.legend-reserved { background: #f59e0b; }

.warehouse-map {
    margin-bottom: 32px;
}

.warehouse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.box-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    min-height: 100px;
    position: relative;
}

.box-cell:hover {
    transform: scale(1.02);
}

.box-cell.box-empty {
    background: rgba(55, 65, 81, 0.4);
    border: 2px dashed rgba(100, 116, 139, 0.4);
    color: #64748b;
}

.box-cell.box-partial {
    background: rgba(99, 102, 241, 0.2);
    border: 2px solid rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
}

.box-cell.box-full {
    background: rgba(34, 197, 94, 0.2);
    border: 2px solid rgba(34, 197, 94, 0.4);
    color: #4ade80;
}

.box-cell.box-blocked {
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.box-cell.box-reserved {
    background: rgba(245, 158, 11, 0.2);
    border: 2px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

.box-code {
    font-size: 1.25rem;
    font-weight: 700;
}

.box-occupancy {
    font-size: 0.8rem;
    margin-top: 4px;
}

.box-client {
    font-size: 0.7rem;
    margin-top: 8px;
    opacity: 0.8;
}

.box-alert {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #fbbf24;
    color: #1e1b4b;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.map-stats {
    display: flex;
    gap: 32px;
    justify-content: center;
    padding: 20px;
    background: rgba(30, 27, 75, 0.3);
    border-radius: 12px;
}

.map-stat {
    text-align: center;
}

.map-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #e2e8f0;
}

.map-stat-label {
    font-size: 0.8rem;
    color: #64748b;
}

/* ==============================
   STORAGEOS - Box Status Badge
============================== */
.box-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.box-status-badge.status-empty {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
}

.box-status-badge.status-partial {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

.box-status-badge.status-full {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.box-status-badge.status-blocked {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.box-status-badge.status-reserved {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

/* Mini Progress Bar */
.mini-progress {
    width: 60px;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    margin-top: 4px;
}

.mini-progress-bar {
    height: 100%;
    background: #6366f1;
    border-radius: 2px;
}

/* Row States */
.row-blocked {
    background: rgba(239, 68, 68, 0.05);
}

.row-warning {
    background: rgba(245, 158, 11, 0.05);
}

/* ==============================
   STORAGEOS - Invoice Status
============================== */
.invoice-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
}

.invoice-status-badge.status-draft {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
}

.invoice-status-badge.status-sent {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.invoice-status-badge.status-paid {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

/* ==============================
   STORAGEOS - Invoice Document
============================== */
.invoice-document {
    background: white;
    color: #1f2937;
    border-radius: 12px;
    padding: 48px;
    max-width: 800px;
}

.invoice-header-section {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid #e5e7eb;
}

.invoice-header-section h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #6b7280;
    margin: 0 0 12px 0;
}

.invoice-header-section p {
    margin: 4px 0;
    font-size: 0.9rem;
}

.invoice-meta {
    text-align: right;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 0;
    font-size: 0.9rem;
}

.meta-label {
    color: #6b7280;
}

.meta-value {
    font-weight: 500;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 32px;
}

.invoice-table th {
    text-align: left;
    padding: 12px 16px;
    background: #f9fafb;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
}

.invoice-table th.text-right {
    text-align: right;
}

.invoice-table td {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.invoice-table td.text-right {
    text-align: right;
}

.invoice-totals-section {
    display: flex;
    justify-content: flex-end;
}

.totals-grid {
    width: 280px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.total-row.total-grand {
    border-top: 2px solid #1f2937;
    border-bottom: none;
    margin-top: 8px;
    padding-top: 16px;
    font-size: 1.1rem;
    font-weight: 700;
}

.invoice-notes-section {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.invoice-notes-section h4 {
    margin: 0 0 8px 0;
    font-size: 0.85rem;
    color: #6b7280;
}

/* Filters Bar */
.filters-bar {
    background: rgba(30, 27, 75, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.filters-form {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #94a3b8;
}

.filter-group select {
    min-width: 180px;
}

/* Detail Grid */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.detail-card {
    background: rgba(30, 27, 75, 0.4);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    padding: 24px;
}

.detail-card.full-width {
    grid-column: 1 / -1;
}

.detail-card h3 {
    margin: 0 0 20px 0;
    font-size: 1rem;
    color: #e2e8f0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: #94a3b8;
}

.detail-value {
    color: #e2e8f0;
    font-weight: 500;
}

.detail-actions {
    margin-top: 16px;
}

.action-buttons-row {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

/* Form Hint Box */
.form-hint-box {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
    font-size: 0.9rem;
    color: #a5b4fc;
}

/* Calculator Grid */
.calculator-grid {
    display: flex;
    gap: 20px;
    align-items: flex-end;
}

.calc-input {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.calc-input label {
    font-size: 0.8rem;
    color: #94a3b8;
}

.calc-input input {
    width: 100px;
}

.calc-result {
    flex: 1;
    text-align: right;
}

.calc-result label {
    font-size: 0.8rem;
    color: #94a3b8;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4ade80;
}

/* ==============================
   STORAGE: DASHBOARD
============================== */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.dashboard-card {
    background: rgba(15, 15, 30, 0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 20px;
}

.dashboard-card h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-header-row h3 {
    margin-bottom: 0;
}

/* Capacity Circle */
.capacity-visual {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.capacity-circle {
    position: relative;
    width: 120px;
    height: 120px;
}

.capacity-circle svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.capacity-circle .capacity-bg {
    fill: none;
    stroke: rgba(255,255,255,0.1);
    stroke-width: 8;
}

.capacity-circle .capacity-fill {
    fill: none;
    stroke: #6366f1;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s ease;
}

.capacity-percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: #e5e7eb;
}

.capacity-details {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.capacity-stat .value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #e5e7eb;
}

.capacity-stat .label {
    font-size: 0.75rem;
    color: #64748b;
}

/* Operations Grid */
.ops-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.op-item {
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.op-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.op-receive .op-icon { color: #4ade80; }
.op-dispatch .op-icon { color: #f97316; }

.op-count {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.op-label {
    font-size: 0.8rem;
    color: #94a3b8;
}

.op-pallets {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 4px;
}

/* Finance Stats */
.finance-stats .finance-value {
    font-size: 2rem;
    font-weight: 700;
    color: #4ade80;
}

.finance-stats .finance-label {
    font-size: 0.8rem;
    color: #64748b;
}

.finance-row {
    display: flex;
    gap: 24px;
    margin-top: 16px;
}

.finance-small .value {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
}

.finance-small .label {
    font-size: 0.75rem;
    color: #64748b;
}

.stat-positive { color: #4ade80; }
.stat-warning { color: #f59e0b; }

/* Zone Summary */
.zone-summary {
    display: flex;
    justify-content: space-between;
}

.zone-stat {
    text-align: center;
    padding: 8px 12px;
    border-radius: 8px;
}

.zone-stat .count {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.zone-stat .label {
    font-size: 0.7rem;
    color: #94a3b8;
}

.zone-stat.zone-empty .count { color: #94a3b8; }
.zone-stat.zone-partial .count { color: #fbbf24; }
.zone-stat.zone-full .count { color: #22c55e; }
.zone-stat.zone-blocked .count { color: #ef4444; }

/* ==============================
   STORAGE: WAREHOUSE MAP
============================== */
.warehouse-map-card {
    margin-bottom: 24px;
}

.warehouse-visual-map {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    padding: 8px;
}

.zone-block {
    position: relative;
    height: 100px;
    border: 2px solid;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.zone-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.zone-code {
    padding: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #e5e7eb;
    z-index: 1;
}

.zone-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 6px;
    transition: width 0.3s ease;
}

.zone-info {
    position: absolute;
    bottom: 12px;
    left: 8px;
    font-size: 0.75rem;
    color: #94a3b8;
}

.zone-blocked-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(239,68,68,0.9);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
}

.zone-block.zone-status-blocked {
    opacity: 0.6;
}

.empty-map {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

/* Dashboard Columns */
.dashboard-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

/* Activity Feed */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
}

.activity-receive .activity-icon {
    background: rgba(74,222,128,0.2);
    color: #4ade80;
}

.activity-dispatch .activity-icon {
    background: rgba(249,115,22,0.2);
    color: #f97316;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    color: #e5e7eb;
}

.activity-meta {
    font-size: 0.8rem;
    color: #64748b;
}

/* Top Clients */
.top-clients-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.top-client-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
}

.top-client-row:hover {
    background: rgba(255,255,255,0.06);
}

.client-name {
    font-weight: 500;
    color: #e5e7eb;
}

.client-pallets {
    font-size: 0.8rem;
    color: #64748b;
}

.client-revenue {
    font-weight: 600;
    color: #4ade80;
}

/* Quick Actions */
.quick-actions-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 8px;
    text-decoration: none;
    color: #a5b4fc;
    font-weight: 500;
    transition: all 0.2s;
}

.quick-action:hover {
    background: rgba(99,102,241,0.2);
    border-color: rgba(99,102,241,0.5);
}

.qa-icon {
    font-size: 1.2rem;
}

/* ==============================
   STORAGE: ZONES
============================== */
.zones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.zone-card {
    background: rgba(15, 15, 30, 0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.zone-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.zone-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.zone-header .zone-code {
    font-weight: 700;
    font-size: 1.2rem;
    padding: 0;
}

.zone-header .zone-type {
    font-size: 0.75rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.zone-body {
    padding: 16px;
}

.zone-body .zone-name {
    font-weight: 500;
    margin-bottom: 12px;
    color: #e5e7eb;
}

.capacity-bar {
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.capacity-bar.large {
    height: 12px;
}

.capacity-bar .capacity-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.capacity-text {
    font-size: 0.8rem;
    color: #94a3b8;
}

.zone-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 8px;
}

.zone-badge.blocked {
    background: rgba(239,68,68,0.2);
    color: #ef4444;
}

.zone-badge.full {
    background: rgba(34,197,94,0.2);
    color: #22c55e;
}

/* Zone Detail */
.zone-color-dot {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.zone-name-small {
    font-weight: 400;
    color: #94a3b8;
    font-size: 0.9em;
    margin-left: 8px;
}

.zone-status-display {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 16px 0;
}

.zone-status-display.status-empty { color: #94a3b8; }
.zone-status-display.status-partial { color: #fbbf24; }
.zone-status-display.status-full { color: #22c55e; }
.zone-status-display.status-blocked { color: #ef4444; }

/* ==============================
   STORAGE: FORMS
============================== */
.client-info-box {
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-fields-section {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 20px;
    margin: 24px 0;
}

.custom-fields-section h3 {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 16px;
}

.color-picker-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-picker-row input[type="color"] {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.color-preview {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Item Summary */
.item-summary-card {
    background: rgba(15, 15, 30, 0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.item-summary-card h3 {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.item-details .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.item-details .detail-row:last-child {
    border-bottom: none;
}

/* ==============================
   STORAGE: PRICING & FIELDS
============================== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.settings-card {
    background: rgba(15, 15, 30, 0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 24px;
}

.settings-card h3 {
    font-size: 0.85rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.pricing-list,
.fields-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.pricing-item,
.field-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
}

.pricing-type {
    font-weight: 500;
    color: #e5e7eb;
}

.pricing-notes {
    font-size: 0.8rem;
    color: #64748b;
    display: block;
    margin-top: 2px;
}

.pricing-rate {
    font-weight: 600;
    color: #4ade80;
}

.field-label {
    font-weight: 500;
    color: #e5e7eb;
}

.field-type {
    font-size: 0.8rem;
    color: #64748b;
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
}

.field-required {
    font-size: 0.7rem;
    color: #f59e0b;
    margin-left: 8px;
}

.add-pricing-form,
.add-field-form {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 20px;
    margin-top: 20px;
}

.add-pricing-form h4,
.add-field-form h4 {
    font-size: 0.85rem;
    color: #e5e7eb;
    margin-bottom: 16px;
}

/* Pricing Chips */
.pricing-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.pricing-chip {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 10px 16px;
}

.pricing-chip .type {
    font-size: 0.8rem;
    color: #94a3b8;
    display: block;
}

.pricing-chip .rate {
    font-weight: 600;
    color: #4ade80;
}

/* ==============================
   STORAGE: INVOICES
============================== */
.invoice-gen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.warning-note {
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: 6px;
    padding: 10px 14px;
    margin-top: 16px;
    font-size: 0.85rem;
    color: #fbbf24;
}

/* Invoice Document */
.invoice-document {
    background: rgba(15, 15, 30, 0.8);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 24px;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

.invoice-title h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #e5e7eb;
    margin-bottom: 8px;
}

.invoice-number {
    font-size: 1.1rem;
    color: #94a3b8;
}

.invoice-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 40px;
}

.invoice-from h4,
.invoice-to h4,
.invoice-details h4 {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.invoice-details .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.invoice-details .label {
    color: #94a3b8;
}

.invoice-details .value {
    color: #e5e7eb;
    font-weight: 500;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.invoice-table th {
    background: rgba(255,255,255,0.05);
    padding: 12px;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.invoice-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.invoice-table .center { text-align: center; }
.invoice-table .right { text-align: right; }

.invoice-totals {
    max-width: 300px;
    margin-left: auto;
}

.invoice-totals .total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.invoice-totals .total-row.grand-total {
    font-size: 1.2rem;
    font-weight: 700;
    border-top: 2px solid rgba(255,255,255,0.1);
    margin-top: 8px;
    padding-top: 16px;
}

.invoice-totals .total-row.paid .value {
    color: #4ade80;
}

.invoice-totals .total-row.outstanding .value {
    color: #f59e0b;
}

.invoice-notes {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.invoice-notes h4 {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 8px;
}

.print-actions {
    text-align: center;
}

/* Type Badges */
.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.type-badge.type-receive {
    background: rgba(74,222,128,0.2);
    color: #4ade80;
}

.type-badge.type-dispatch {
    background: rgba(249,115,22,0.2);
    color: #f97316;
}

/* Big Stat */
.big-stat {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.big-stat .value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4ade80;
}

.big-stat .currency {
    font-size: 1rem;
    color: #64748b;
}

/* Stats Row */
.stats-row {
    display: flex;
    gap: 24px;
}

.stat-item {
    text-align: center;
}

.stat-item .stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #e5e7eb;
}

.stat-item .stat-label {
    font-size: 0.8rem;
    color: #64748b;
}

.stat-item.stat-in .stat-value { color: #4ade80; }
.stat-item.stat-out .stat-value { color: #f97316; }

/* Print Styles */
@media print {
    .sidebar,
    .page-header .header-actions,
    .filters-bar,
    .form-card,
    .print-actions {
        display: none !important;
    }
    
    .main-content,
    .app-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .invoice-document {
        box-shadow: none;
        padding: 20px;
        background: white;
        border: none;
    }
}

/* ==============================
   REPEATABLE FIELD CONFIGURATION
============================== */
.subfield-item {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.subfield-item .subfield-name {
    flex: 1;
}

.subfield-item .subfield-type {
    width: 120px;
}

/* ==============================
   REPEATABLE FIELD (Public Form) - Accordion Style
============================== */
.repeatable-group {
    background: linear-gradient(145deg, rgba(30, 35, 50, 0.5), rgba(20, 25, 35, 0.6));
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.repeatable-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.repeatable-group-header h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e5e7eb;
    margin: 0;
    text-transform: none;
}

.repeatable-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Accordion Item */
.repeatable-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.repeatable-item.expanded {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(0, 0, 0, 0.3);
}

/* Accordion Header - Always Visible */
.repeatable-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.repeatable-item-header:hover {
    background: rgba(99, 102, 241, 0.1);
}

.repeatable-item-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.repeatable-item-number {
    font-size: 0.75rem;
    font-weight: 700;
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.2);
    padding: 4px 10px;
    border-radius: 4px;
    flex-shrink: 0;
}

.repeatable-item-summary {
    font-size: 0.85rem;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.repeatable-item-summary.has-data {
    color: #e5e7eb;
}

.repeatable-item-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.expand-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: transform 0.2s ease;
}

.repeatable-item.expanded .expand-icon {
    transform: rotate(180deg);
}

.repeatable-item .remove-item-btn {
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 500;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.repeatable-item .remove-item-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    transform: none;
    box-shadow: none;
}

/* Accordion Content - Collapsible */
.repeatable-subfields {
    display: none;
    padding: 14px;
    padding-top: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.repeatable-item.expanded .repeatable-subfields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    padding-top: 14px;
}

.repeatable-subfield {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.repeatable-subfield label {
    font-size: 0.7rem;
    font-weight: 500;
    color: #94a3b8;
    text-transform: capitalize;
    letter-spacing: 0;
}

.repeatable-subfield input,
.repeatable-subfield textarea {
    padding: 8px 12px;
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
}

.repeatable-subfield input:focus,
.repeatable-subfield textarea:focus {
    border-color: #6366f1;
    background: rgba(0, 0, 0, 0.4);
}

.repeatable-subfield textarea {
    min-height: 60px;
    resize: vertical;
}

/* Add Button */
.add-item-btn {
    margin-top: 10px;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    background: transparent;
    border: 1px dashed rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
    width: 100%;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.add-item-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: #6366f1;
    border-style: solid;
    transform: none;
    box-shadow: none;
}

/* ==============================
   REPEATABLE FIELD (Submission View)
============================== */
.repeatable-data-view {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.repeatable-data-item {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 12px;
}

.repeatable-data-item-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6366f1;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.repeatable-data-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
}

.repeatable-data-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.repeatable-data-field .field-name {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
}

.repeatable-data-field .field-value {
    font-size: 0.9rem;
    color: #e5e7eb;
}
