:root {
    --bg-primary: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #0f172a;
    --border-color: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #f8fafc;
    
    --primary: #1e293b;
    --primary-hover: #334155;
    
    --accent: #b8d935;
    --accent-hover: #a3c22b;
    --accent-bg: #f5fbe3;
    
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --danger-text: #991b1b;
    
    --success: #10b981;
    --success-bg: #d1fae5;
    --success-text: #065f46;
    
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --warning-text: #92400e;
    
    --info-bg: #e0f2fe;
    --info-text: #0369a1;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
    height: 100vh;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar Styling */
.sidebar {
    background-color: var(--bg-sidebar);
    color: var(--text-light);
    width: 320px;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header .logo {
    font-size: 28px;
    background: rgba(255, 255, 255, 0.08);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.sidebar-header .brand h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.sidebar-header .brand span {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-content {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 16px;
}

.card h3 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.card-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Upload Dropzone */
.drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.01);
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--accent);
    background: rgba(184, 217, 53, 0.05);
}

.drop-zone-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.drop-zone-text {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
}

.drop-zone-text span {
    color: var(--text-muted);
    font-size: 11px;
}

/* File Info Box */
.file-info {
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.file-name-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-name {
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--accent);
}

/* Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: none;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-primary {
    background-color: #ffffff;
    color: var(--bg-sidebar);
}

.btn-primary:not(:disabled):hover {
    background-color: var(--accent);
    color: var(--bg-sidebar);
}

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

.btn-secondary:not(:disabled):hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.btn-accent {
    background-color: var(--accent);
    color: var(--bg-sidebar);
}

.btn-accent:not(:disabled):hover {
    background-color: var(--accent-hover);
    box-shadow: 0 0 12px rgba(184, 217, 53, 0.3);
}

.btn-small {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #ffffff;
    border: none;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-small:hover {
    background: var(--primary-hover);
}

.btn-delete {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 14px;
}

.btn-delete:hover {
    color: var(--danger);
    background: var(--danger-bg);
}

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.sidebar-footer p {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Workspace Layout */
.workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100vh;
}

.workspace-header {
    padding: 24px 32px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title h1 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header-title p {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-primary);
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 12px;
}

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

.status-dot.green { background-color: var(--success); }
.status-dot.yellow { background-color: var(--warning); }
.status-dot.red { background-color: var(--danger); }

/* Tabs Navigation */
.workspace-tabs {
    background: #ffffff;
    padding: 0 32px;
    display: flex;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 16px 8px;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    color: var(--text-main);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
}

/* Tab Content */
.tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    display: none;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Content Blocks */
.section-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

.section-card h2 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

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

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

/* Metadata Fields Grid */
.metadata-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

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

.form-group label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input, .form-group select, .form-group textarea {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-main);
    background-color: #ffffff;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.05);
}

/* Textarea style */
textarea {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
    resize: vertical;
}

/* Table Editor Styling */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background: #ffffff;
}

th, td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

th {
    background-color: var(--bg-primary);
    font-weight: 700;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

tr:last-child td {
    border-bottom: none;
}

/* Editable cells styling */
.editable-cell {
    border: 1px solid transparent;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    width: 100%;
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
    transition: var(--transition);
}

.editable-cell:focus {
    border-color: var(--border-color);
    background: var(--bg-primary);
}

.status-select {
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    outline: none;
}

/* Status Badge Themes for selection values */
select.status-select[data-val="ACTION REQUIRED"], 
select.status-select[data-val="NON-COMPLIANCE"] {
    background-color: var(--danger-bg);
    color: var(--danger-text);
    border-color: #fca5a5;
}

select.status-select[data-val="COMPLIANT"], 
select.status-select[data-val="COMPLIES"], 
select.status-select[data-val="PASS"] {
    background-color: var(--success-bg);
    color: var(--success-text);
    border-color: #6ee7b7;
}

select.status-select[data-val="NEEDS REVIEW"] {
    background-color: var(--warning-bg);
    color: var(--warning-text);
    border-color: #fde68a;
}

select.status-select[data-val="OPTIONAL"] {
    background-color: var(--info-bg);
    color: var(--info-text);
    border-color: #bae6fd;
}

/* Live Preview Frame */
.preview-container {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #ffffff;
    flex: 1;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-container {
    text-align: center;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

#loading-text {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.2px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast Message */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-sidebar);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    font-weight: 600;
    z-index: 10000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Skeleton Loaders */
.skeleton-loader {
    height: 42px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-loader.short {
    height: 38px;
}

@keyframes loading {
    to { background-position: -200% 0; }
}

/* AI Chat Editor Styling */
.chat-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slider-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.slider {
    -webkit-appearance: none;
    width: 120px;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    transition: var(--transition);
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    transition: var(--transition);
}

.slider::-webkit-slider-thumb:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

.chat-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #ffffff;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background-color: #f8fafc;
}

.chat-message {
    display: flex;
    width: 100%;
}

.chat-message.assistant {
    justify-content: flex-start;
}

.chat-message.user {
    justify-content: flex-end;
}

.chat-message .message-bubble {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    max-width: 75%;
    line-height: 1.5;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chat-message.assistant .message-bubble {
    background-color: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-top-left-radius: 2px;
}

.chat-message.user .message-bubble {
    background-color: var(--primary);
    color: #ffffff;
    border-top-right-radius: 2px;
}

.chat-input-area {
    display: flex;
    padding: 16px;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    gap: 12px;
    align-items: flex-end;
}

.chat-input-area textarea {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
    resize: none;
    height: 50px;
    min-height: 50px;
    max-height: 120px;
    transition: var(--transition);
}

.chat-input-area textarea:focus {
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.05);
}

.chat-input-area .btn {
    width: auto;
    height: 50px;
    padding: 0 24px;
}

/* ════════════════════════════════════════════════════════════
   LOGIN SCREEN STYLING
   ════════════════════════════════════════════════════════════ */
.login-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    background-color: #0b0f19;
    font-family: var(--font-body);
    overflow: hidden;
}

.login-form-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    background-color: #ffffff;
    max-width: 500px;
    min-width: 420px;
    border-right: 1px solid var(--border-color);
}

.login-box {
    margin: auto 0;
    width: 100%;
}

.login-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 40px;
}

.login-logo {
    font-size: 24px;
}

.login-logo-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.login-header h1 {
    font-family: var(--font-heading);
    font-size: 30px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 32px;
}

.login-form .form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-form label {
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.login-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    color: var(--text-main);
    background-color: var(--bg-primary);
    transition: var(--transition);
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-hover);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.08);
}

.login-error-msg {
    background-color: var(--danger-bg);
    color: var(--danger-text);
    padding: 12px 14px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(239, 68, 68, 0.2);
    animation: shake 0.4s ease-in-out;
}

.btn-login-submit {
    width: 100%;
    padding: 14px;
    font-weight: 600;
    font-size: 14px;
    background-color: var(--bg-sidebar);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}

.btn-login-submit:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.login-footer p {
    color: var(--text-muted);
    font-size: 11px;
    text-align: center;
}

/* Right Side: Brand Showcase */
.login-brand-side {
    flex: 2;
    background-color: #0b0f19;
    background-image: radial-gradient(circle at 10% 20%, rgba(184, 217, 53, 0.12) 0%, transparent 40%),
                      radial-gradient(circle at 90% 80%, rgba(30, 41, 59, 0.4) 0%, transparent 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px;
    position: relative;
    overflow: hidden;
}

.brand-showcase-content {
    max-width: 550px;
    z-index: 2;
    color: #ffffff;
}

.brand-showcase-content .badge {
    display: inline-block;
    padding: 6px 12px;
    background-color: rgba(184, 217, 53, 0.12);
    color: var(--accent);
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.1em;
    border-radius: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(184, 217, 53, 0.2);
}

.brand-showcase-content h2 {
    font-family: var(--font-heading);
    font-size: 38px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.brand-showcase-content p {
    color: #94a3b8;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 32px;
}

.feature-pills {
    display: flex;
    gap: 12px;
}

.feature-pills .pill {
    padding: 6px 14px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    color: #cbd5e1;
    backdrop-filter: blur(8px);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}


