:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    /* Gradient Accents */
    --gradient-primary: linear-gradient(135deg, #10b981, #3b82f6, #8b5cf6);
    --gradient-hover: linear-gradient(135deg, #059669, #2563eb, #7c3aed);
    
    --color-success: #10b981;
    --color-info: #3b82f6;
    --color-purple: #8b5cf6;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --border-radius: 12px;
}

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

body {
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--color-info);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-align: center;
}

.btn-gradient {
    background: var(--gradient-primary);
    color: white;
}

.btn-gradient:hover {
    background: var(--gradient-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--color-info);
    color: var(--color-info);
}

.card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    transition: all 0.3s ease-in-out;
    overflow-x: hidden;
    white-space: nowrap;
}

body.sidebar-collapsed .sidebar {
    width: 0 !important;
    min-width: 0 !important;
    padding: 1.5rem 0 !important;
    border-right: none !important;
    opacity: 0;
    pointer-events: none;
}

.sidebar .brand {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background: var(--bg-main);
    color: var(--color-purple);
}

.main-content {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: all 0.3s ease-in-out;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-info);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}


/* --- PROJECT CHARTER PRINT STYLES --- */
@media print {
    @page {
        size: A4;
        margin: 0;
    }
    body {
        background: white;
        counter-reset: page;
    }
    .page-num::after {
        counter-increment: page;
        content: counter(page);
    }
    .no-print {
        display: none !important;
    }
    thead { display: table-header-group; }
    tfoot { display: table-footer-group; }
    
    .a4-page {
        margin: 0 !important;
        padding: 20mm !important;
        box-shadow: none !important;
        border: none !important;
    }
}

.custom-html-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}
.custom-html-content table, .custom-html-content th, .custom-html-content td {
    border: 1px solid black;
    padding: 0.5rem;
}
.doc-header {
    width: 100%;
}
.doc-footer {
    width: 100%;
}
