:root {
    --primary: #1A1A1A;
    --primary-light: #2C2C2C;
    --accent: #ECAE35; /* Orange/Gold accent, very agency */
    --accent-hover: #F2C364;
    --bg: #F8F9FA;
    --surface: #FFFFFF;
    --text: #1A1A1A;
    --text-muted: #6C757D;
    --border: #E9ECEF;
    --danger: #DC3545;
    
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 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);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Navbar */
.navbar {
    background-color: var(--surface);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
    text-decoration: none;
}

.nav-links a {
    margin-left: 2rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

.container {
    max-width: 100%;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Typography & Headers */
h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; font-weight: 600; }
.subtitle { color: var(--text-muted); font-size: 1rem; }

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

.back-link {
    display: inline-block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}
.back-link:hover { color: var(--primary); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

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

.btn-secondary {
    background-color: white;
    color: var(--primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background-color: var(--bg);
}

.btn-text {
    background: none;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
}
.btn-text:hover { color: var(--primary); background: var(--bg); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: #ffebee; color: var(--danger); }

.btn-block { width: 100%; padding: 0.75rem; }

/* Cards & Grid (Index) */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: 1px solid var(--border);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.card-header { border-bottom: 1px solid var(--border); padding-bottom: 0.75rem; margin-bottom: 1rem; }
.info-row { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.info-row .label { color: var(--text-muted); font-size: 0.875rem; }
.info-row .value { font-weight: 500; font-size: 0.875rem; }

/* Timeline UI */
.timeline-wrapper {
    overflow-x: auto;
    padding-bottom: 2rem;
}

.timeline-container {
    display: flex;
    gap: 0.5rem;   /* COMPACT: Reduced gap */
    min-height: 200px; /* COMPACT: Reduced height */
    align-items: flex-start;
    padding: 0.25rem;
}

.timeline-stage {
    min-width: 130px; /* COMPACT: Narrower boxes */
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    border-top: 4px solid var(--accent);
    padding: 0.75rem; /* COMPACT: Reduced padding */
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: grab;
}

.timeline-stage:active { cursor: grabbing; }

.timeline-date {
    font-size: 0.75rem; /* COMPACT */
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.2rem;
}

.timeline-dayname {
    font-size: 0.65rem; /* COMPACT */
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem; /* COMPACT */
}

.timeline-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.timeline-inputs {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 0.25rem; /* COMPACT */
    background: var(--bg);
    padding: 0.25rem 0.5rem; /* COMPACT */
    border-radius: var(--radius);
}

.timeline-inputs input {
    width: 40px; /* COMPACT */
    padding: 0.25rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-align: center;
    font-family: inherit;
    font-weight: 600;
}

.timeline-inputs label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.stage-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.timeline-stage:hover .stage-delete { opacity: 1; }
.stage-delete:hover { color: var(--danger); }

/* Ghost element for SortableJS */
.sortable-ghost {
    opacity: 0.4;
    background-color: #f0f0f0;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--surface);
    margin: 10% auto;
    padding: 2rem;
    border-radius: var(--radius-lg);
    max-width: 400px;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-btn {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.input-field {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}
.input-field:focus {
    outline: none;
    border-color: var(--primary);
}

/* Admin List */
.admin-panel { max-width: 800px; }
.admin-list { margin-top: 2rem; }
.admin-list-item {
    display: flex;
    align-items: center;
    background: var(--surface);
    padding: 1rem;
    border: 1px solid var(--border);
    margin-bottom: 0.5rem;
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.admin-drag-handle {
    cursor: grab;
    color: var(--text-muted);
    margin-right: 1rem;
    padding: 0.5rem;
}
.admin-item-info { flex-grow: 1; display: flex; align-items: center; gap: 1rem; }
.badge {
    background: var(--bg);
    padding: 0.25rem 0.5rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}
.admin-item-actions { display: flex; gap: 0.5rem; }

.info-note {
    background: #FFF4E5;
    border-left: 4px solid var(--accent);
    padding: 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #663C00;
    margin-top: 2rem;
}

/* Standard Calendar Grid */
.calendar-section {
    margin-top: 3rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.calendar-header {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.calendar-day-header {
    background: var(--bg);
    padding: 0.5rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.calendar-cell {
    background: var(--surface);
    min-height: 80px;
    padding: 0.5rem;
    position: relative;
    font-size: 0.875rem;
}

.calendar-cell.weekend {
    background: #fdfdfd;
}

.calendar-cell .date-num {
    font-weight: 700;
    color: var(--text-muted);
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.75rem;
}

.calendar-event {
    background: var(--accent);
    color: #fff;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.70rem;
    margin-top: 18px;
    margin-bottom: 2px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

/* Approvals Overview text */
.approvals-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.approvals-section h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.approvals-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.approval-item {
    background: var(--surface);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.approval-item .approval-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.approval-item .approval-date {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.875rem;
}

.timeline-name-input {
    width: 100%;
    border: none;
    background: transparent;
    font-weight: 600;
    font-size: 0.875rem; /* COMPACT */
    margin-bottom: 0.5rem; /* COMPACT */
    line-height: 1.2;
    font-family: inherit;
    color: inherit;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 2px;
}
.timeline-name-input:focus {
    outline: none;
    border-bottom-color: var(--accent);
}

