:root {
    --primary: #e63946;
    --primary-dark: #c1121f;
    --secondary: #457b9d;
    --dark: #1d3557;
    --light: #f1faee;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-700: #495057;
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --border-radius: 12px;
}

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

body {
    font-family: 'Pretendard', -apple-system, system-ui, sans-serif;
    background-color: #f4f7f6;
    color: var(--dark);
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
nav {
    width: 260px;
    background: var(--dark);
    color: white;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: fixed;
    height: 100vh;
}

nav .logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    padding-left: 1rem;
    color: var(--primary);
}

nav button {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.7);
    padding: 1rem;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

nav button:hover, nav button.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

nav button.active {
    background: var(--primary);
    color: white;
}

/* Main Content Area */
main {
    margin-left: 260px;
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
}

/* Cards & Layout */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Data Grid (Master Table Style) */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.data-table th {
    background: var(--gray-100);
    padding: 1rem;
    text-align: left;
    font-size: 0.85rem;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.9rem;
}

/* Professional Record Sheet (건물 대장 양식) */
.record-sheet {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--gray-300);
}

.record-sheet .label {
    background: var(--gray-100);
    padding: 0.75rem;
    font-weight: 700;
    border-right: 1px solid var(--gray-300);
    border-bottom: 1px solid var(--gray-300);
    font-size: 0.85rem;
}

.record-sheet .value {
    padding: 0.75rem;
    border-right: 1px solid var(--gray-300);
    border-bottom: 1px solid var(--gray-300);
    font-size: 0.9rem;
}

.record-sheet .value:last-child, .record-sheet .label:last-child {
    border-right: none;
}

/* [표 4] View Style */
.inspection-report {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
}

/* Badge Styles */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-red { background: #ffe3e3; color: #e63946; }
.badge-green { background: #d3f9d8; color: #2b8a3e; }
.badge-blue { background: #e7f5ff; color: #1971c2; }

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-outline { background: transparent; border: 1px solid var(--gray-300); color: var(--gray-700); }
.btn-outline:hover { background: var(--gray-100); }

/* Utility Classes */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

@media (max-width: 1024px) {
    nav { width: 80px; padding: 2rem 0.5rem; }
    nav span { display: none; }
    main { margin-left: 80px; }
}
