/* --- Apple-Inspired Glassmorphism Design System --- */

:root {
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --glass-blur: blur(20px);
    
    --text-primary: #1d1d1f; /* Apple's main dark text */
    --text-secondary: #86868b;
    --accent-blue: #0066cc;
    --accent-blue-hover: #004499;
    --accent-green: #34c759;
    --accent-red: #ff3b30;
    --border-radius: 20px;
    --sidebar-width: 250px;
    
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    font-family: var(--font-stack);
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Glass Panel Base Class */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--border-radius);
}

/* --- Layout --- */

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    /* Glass properties integrated directly or via class */
}

.sidebar .logo {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    padding: 12px 16px;
    border-radius: 12px;
    display: block;
    transition: all 0.3s ease;
}

.nav-links li a:hover,
.nav-links li a.active {
    background: rgba(0, 102, 204, 0.1);
    color: var(--accent-blue);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 40px;
    max-width: calc(100vw - var(--sidebar-width));
}

header {
    margin-bottom: 30px;
}

h1 {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

h2 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
}

p.subtitle {
    color: var(--text-secondary);
    font-size: 16px;
}

/* --- Components --- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.card {
    padding: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.2);
}

.card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.card .value {
    font-size: 32px;
    font-weight: 700;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 14px;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.6);
    font-family: var(--font-stack);
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
    background: #fff;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--accent-blue-hover);
    transform: scale(1.02);
}

.btn-secondary {
    background: rgba(0,0,0,0.05);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(0,0,0,0.1);
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: var(--border-radius);
}

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

th, td {
    padding: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

tr:hover td {
    background: rgba(255,255,255,0.3);
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-bar {
    height: 100%;
    background: var(--accent-blue);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Status Badges */
.status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status.planning { background: rgba(0, 102, 204, 0.1); color: var(--accent-blue); }
.status.grey-structure { background: rgba(255, 149, 0, 0.1); color: #ff9500; }
.status.finishing { background: rgba(88, 86, 214, 0.1); color: #5856d6; }
.status.completion { background: rgba(52, 199, 89, 0.1); color: var(--accent-green); }

