:root {
    --red-primary: #c62828; --red-dark: #b71c1c; --text-dark: #263238; --text-light: #ECEFF1;
    --text-muted: #78909C; --bg-main: #F0F2F5; --surface-color: #FFFFFF; --border-color: #CFD8DC;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.07); --radius: 12px; --font-sans: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
}
body {
    font-family: var(--font-sans); margin: 0; background-color: var(--bg-main);
    color: var(--text-dark); display: flex; height: 100vh; overflow: hidden;
}
* { box-sizing: border-box; }
a { text-decoration: none; color: var(--red-primary); }
.sidebar {
    width: 240px; background-color: #1F2937; color: var(--text-light); display: flex; flex-direction: column;
    height: 100vh; position: fixed; top: 0; left: 0; flex-shrink: 0;
}
.sidebar-header { padding: 1.5rem; text-align: center; border-bottom: 1px solid #374151; }
.sidebar-header h1 { margin: 0; font-size: 1.5rem; color: #FFFFFF; }
.sidebar-nav { list-style: none; padding: 1rem 0; margin: 0; flex-grow: 1; }
.sidebar-nav li a {
    display: flex; align-items: center; gap: 1rem; padding: 1rem 1.5rem; color: #9CA3AF;
    font-weight: bold; text-decoration: none; transition: all 0.2s ease-in-out; border-left: 4px solid transparent;
}
.sidebar-nav li a:hover { background-color: #374151; color: #FFFFFF; }
.sidebar-nav li a.active { background-color: var(--red-primary); color: #FFFFFF; border-left: 4px solid #F87171; }
.sidebar-nav li a i { width: 20px; text-align: center; font-size: 1.1rem; }
.sidebar-footer { padding: 1.5rem; font-size: 0.8rem; color: #6B7280; border-top: 1px solid #374151; }
.main-content {
    flex-grow: 1; margin-left: 240px; padding: 2.5rem; overflow-y: auto; height: 100vh;
}
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.page-header h2 { margin: 0; font-size: 2.25rem; }
.card {
    background-color: var(--surface-color); border-radius: var(--radius);
    padding: 2rem; box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 1rem 1.5rem; text-align: left; border-bottom: 1px solid var(--border-color); }
th { text-transform: uppercase; font-size: 0.8rem; color: var(--text-muted); }
tbody tr:hover { background-color: var(--bg-main); }
button, .view-btn, .action-btn {
    padding: 0.75rem 1.5rem; background-color: var(--red-primary); color: white !important;
    border: none; border-radius: 8px; cursor: pointer; font-weight: bold; text-decoration: none;
    display: inline-block; text-align: center; font-size: 14px; transition: all 0.2s;
}
button:hover, .view-btn:hover, .action-btn:hover { background-color: var(--red-dark); transform: translateY(-2px); }
.btn-secondary { background-color: #6B7280; color: white !important; }
.btn-secondary:hover { background-color: #4B5563; }
input, select, textarea {
    width: 100%; padding: 0.75rem; border: 1px solid var(--border-color); border-radius: 8px;
    box-sizing: border-box; font-family: inherit; background-color: #FFFFFF; color: var(--text-dark);
}
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.7);
    display: flex; justify-content: center; align-items: center; z-index: 1000; overflow-y: auto;
}
.modal-content {
    background-color: var(--surface-color); padding: 1rem 2rem 2rem 2rem; border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3); width: 90%; max-width: 900px; /* Wider modal */
    margin: 2rem 0;
}
fieldset { border: 1px solid var(--border-color); border-radius: 8px; padding: 1.5rem; margin-top: 1.5rem; }
legend { font-weight: bold; color: var(--red-primary); padding: 0 0.5rem; font-size: 1.1rem; }
.form-grid-2, .form-grid-3, .form-grid-4 { display: grid; gap: 1rem; }
.form-grid-2 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.form-grid-3 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.form-grid-4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.checklist-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.75rem; }
.form-check { display: flex; align-items: center; }
.form-check input { width: auto; margin-right: 0.75rem; }
.form-check label { margin-bottom: 0; font-weight: normal; }
.profile-header-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.profile-card { border: none; padding: 0; box-shadow: none;}
.profile-header { background-color: var(--bg-main); padding: 2rem; text-align: center; border-radius: var(--radius); }
.profile-header img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 4px solid white; box-shadow: 0 4px 10px rgba(0,0,0,0.15); margin-bottom: 1rem; }
.tab-container { border-bottom: 2px solid var(--border-color); margin-bottom: 1rem; }
.tab-link { padding: 1rem; cursor: pointer; background-color: transparent; border: none; font-size: 1rem; color: var(--text-muted); font-weight: bold; border-bottom: 3px solid transparent;}
.tab-link.active { border-bottom: 3px solid var(--red-primary); color: var(--text-dark); }
.hidden { display: none; }
.profile-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 1.5rem; }
.profile-details h4 { grid-column: 1 / -1; margin: 0 0 0.5rem 0; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-color); }
.profile-details p { margin: 0; display: flex; flex-direction: column; align-items: flex-start; }
.profile-details p strong { margin-bottom: 0.25rem; color: var(--text-muted); font-size: 0.9rem;}
.profile-header .edit-mode input { display: inline-block; width: auto; margin: 0 5px; }
input[readonly] { background-color: #e9ecef; }