/* Refined Business UI - Spacing & X-Axis Control */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #2563eb;
    --primary-light: #eff6ff;
    --secondary: #059669;
    --danger: #dc2626;
    --warning: #d97706;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --bg-main: #f8fafc;
    --bg-white: #ffffff;
    --border: #e2e8f0;
    --card-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --sidebar-w: 280px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.4);
    --hero-gradient: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

.dashboard-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-w);
    background-color: var(--bg-white);
    border-right: 1px solid var(--border);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .sidebar {
        display: none;
    }
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 12px;
    margin-bottom: 6px;
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
}

/* Main Area */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-width: 0;
}

.header {
    height: 72px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.content-padding {
    padding: 40px;
    width: 100%;
    box-sizing: border-box;
    max-width: 1400px;
}

@media (max-width: 768px) {
    .content-padding {
        padding: 24px;
    }
}

/* Section Management - NO MERGING */
.form-section {
    background: white;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.hero-banner {
    background: var(--hero-gradient);
    color: white;
    padding: 60px 50px;
    border-radius: var(--radius-lg);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.2);
}

.hero-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fef3c7;
}

.badge-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #d1fae5;
}

.badge-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fee2e2;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 16px;
    /* Reduced gap after title */
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Grid & Spacing Management */
.grid-primary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    /* X and Y gap between big sections */
}

@media (min-width: 1024px) {
    .grid-primary {
        grid-template-columns: 1.4fr 1fr;
    }
}

/* Individual Input Spacing */
.form-group {
    margin-bottom: 16px !important;
    /* Reduced vertical gap between fields */
}

.sub-field-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    /* Force internal gap in grids */
}

@media (min-width: 640px) {
    .sub-field-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Input Protocol */
.form-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
    /* Gap between label and input */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-left: 4px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    /* High internal padding */
    background-color: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
    box-sizing: border-box;
}

.form-input:focus {
    background-color: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
    outline: none;
}

/* Table Protection */
.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-top: 24px;
}

.data-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

.data-table th {
    background-color: #f8fafc;
    padding: 16px;
    text-align: left;
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    background: white;
}

.data-input {
    border: none;
    background: transparent;
    width: 100%;
    font-weight: 700;
    font-size: 11px;
    padding: 8px;
    color: var(--text-main);
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

/* Assignment Slip UI */
.assignment-slip {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 40px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    max-width: 1000px;
    margin: 0 auto;
    color: #1a202c;
    font-family: 'Inter', sans-serif;
}

.slip-header {
    border-bottom: 2px solid #000;
    padding-bottom: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slip-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
    border: 1px solid #000;
    margin-bottom: 30px;
}

.slip-cell {
    border: 1px solid #000;
    padding: 15px;
}

.slip-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #000;
    margin-bottom: 8px;
    display: block;
}

.slip-value {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.meta-table {
    width: 100%;
    border-collapse: collapse;
}

.meta-table tr td {
    padding: 4px 8px;
    font-size: 11px;
    border: 1px solid #000;
}

.manifest-table {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid #000;
    margin-top: 20px;
}

.manifest-table th {
    background: #f8fafc;
    border: 1px solid #000;
    padding: 8px;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
}

.manifest-table td {
    border: 1px solid #000;
    padding: 8px;
    font-size: 11px;
}

.doc-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.doc-item {
    background: #f1f5f9;
    padding: 10px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid var(--border);
}

.assignee-box {
    margin-top: 30px;
    padding: 20px;
    background: var(--primary-light);
    border-radius: 12px;
    border: 1px dashed var(--primary);
}