/* Modern Light Theme - Dashboard Design Refined */
:root {
    --bg-color: #f1f5f9;
    /* Light Gray for Main Content Background */
    --sidebar-bg: #ffffff;
    /* White for Sidebar */
    --card-bg: #ffffff;
    /* White for Cards */

    --text-color: #0f172a;
    /* Dark Slate / Almost Black for primary text */
    --text-muted: #64748b;
    /* Slate 500 for secondary text */

    --primary-color: #0ea5e9;
    /* Vivid Blue for "Folytatás" button & Badges */
    --primary-hover: #0284c7;

    --border-color: #e2e8f0;
    /* Slate 200 for borders */

    --sidebar-width: 250px;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;

    /* Specific Badge Colors */
    --badge-blue: #0ea5e9;
    --badge-dark: #334155;
    --badge-green: #84cc16;
    /* Lime Green/Bright Green for "Kész" */
}

*,
*:before,
*:after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    /* Overall BG is the gray one */
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.5;
    min-height: 100vh;
}

/* Layout Wrapper */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    /* White */
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 32px 48px;
    background-color: var(--bg-color);
    /* Light Gray */
}

/* Sidebar Elements */
.profile-section {
    margin-bottom: 30px;
}

.profile-image-placeholder {
    width: 80px;
    /* Slightly larger in screenshot? */
    height: 80px;
    background-color: #cbd5e1;
    /* Light gray circle */
    border-radius: 50%;
    margin-bottom: 20px;
}

.sidebar-actions {
    margin-bottom: 40px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Spacing between nav items */
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    /* Minimal horizontal padding, more specific spacing */
    color: var(--text-muted);
    /* Gray text default */
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}

.nav-item:hover,
.nav-item.active {
    color: var(--text-color);
    /* Darker on hover/active */
    /* No background on active/hover in this design apparently, just text color change? Or subtle text. */
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    margin-right: 12px;
}

.sidebar-bottom {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.logout-link {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-icon-only {
    padding: 8px;
    background-color: white;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: 6px;
}

.btn-icon-only:hover {
    background-color: #f8fafc;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.page-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-color);
    margin: 0;
    min-width: 150px;
}

.search-container {
    flex-grow: 1;
    position: relative;
    max-width: 800px;
    /* Does not span full width necessarily */
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    /* Slightly sharper styling? */
    font-size: 15px;
    color: var(--text-color);
    background-color: #ffffff;
    /* White input on gray bg */
    outline: none;
}

.search-input:focus {
    border-color: var(--primary-color);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 16px;
}

/* Grid Layout */
.flex-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Force 3 columns as mostly seen, or auto-fill with max-width */
    gap: 30px;
    /* Larger gap */
}

@media (max-width: 1200px) {
    .flex-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .flex-grid {
        grid-template-columns: 1fr;
    }
}

/* Card Styling */
.card {
    background: var(--card-bg);
    /* White */
    border: 1px solid var(--border-color);
    /* Subtle border */
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    /* Context for badges */
    display: flex;
    flex-direction: column;
}

.card-image {
    height: 180px;
    background-color: #e2e8f0;
    /* Fallback */
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Card Badges - Positioned INSIDE image area */
.card-badges {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    gap: 8px;
}

.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    text-transform: capitalize;
    /* Ensure "Punch list" look */
}

.badge-id {
    background-color: var(--Badge-blue, #0ea5e9);
}

.badge-punch-list {
    background-color: var(--badge-dark);
}

.badge-completed {
    background-color: var(--badge-green);
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    /* Stretch to fill */
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: var(--text-color);
}

.card-meta {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.8;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-icon {
    color: #94a3b8;
}

.card-actions {
    margin-top: auto;
    display: flex;
    gap: 12px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    /* Text padding */
    height: 40px;
    min-width: 40px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    text-decoration: none;
}

.page-btn:hover {
    background-color: #f8fafc;
}

.page-btn.active {
    background-color: #e2e8f0;
    /* Active gray */
    font-weight: 600;
}

.page-dots {
    font-weight: 700;
    color: var(--text-color);
    margin: 0 4px;
}

/* Responsive Sidebar */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        align-items: center;
        overflow-y: visible;
        padding: 10px;
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
    }

    .profile-section,
    .sidebar-actions,
    .sidebar-bottom {
        display: none;
        /* Simplify for mobile for now or adjust */
    }
}

/* Room Inspection Page Redesign */
.room-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: #ffffff;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.back-link {
    display: flex;
    align-items: center;
    color: var(--text-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
}

.back-link:hover {
    color: var(--primary-color);
}

.room-main-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
}

.room-page-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 40px;
}

.new-room-container {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 40px;
}

.new-room-input {
    border: none;
    flex-grow: 1;
    padding: 10px;
    font-size: 16px;
    outline: none;
}

.btn-create-room {
    background: white;
    border: 1px solid #38bdf8;
    /* Light blue border */
    color: #0ea5e9;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 6px;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-create-room:hover {
    background: #f0f9ff;
}

/* Room Grid */
.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.room-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 200px;
    /* Fixed height approx */
    position: relative;
}

.room-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: auto;
    /* Push content down */
}

.room-name {
    font-weight: 700;
    font-size: 16px;
}

.room-snag-badge {
    background: #475569;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.room-card-btn {
    width: 100%;
    margin-top: auto;
    background: #0ea5e9;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: block;
}

.room-card-btn:hover {
    background: #0284c7;
}

.finish-btn-container {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.btn-finish {
    background: #0ea5e9;
    color: white;
    padding: 12px 40px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
}

.btn-finish:hover {
    background: #0284c7;
}
/* Review Page Redesign */
.review-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 900px) {
    .review-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: #f8fafc; /* Light gray background as per screenshot */
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    height: 100%;
}

.stat-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--text-color);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 15px;
    color: #475569;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-value {
    font-weight: 600;
    color: var(--text-color);
    font-size: 16px;
}

.action-buttons-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.btn-action-outline {
    background: white;
    border: 1px solid #38bdf8;
    color: #0ea5e9;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-action-outline:hover {
    background: #f0f9ff;
}

.btn-action-solid {
    background: #0ea5e9;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-action-solid:hover {
    background: #0284c7;
}

.btn-action-gray {
    background: #e2e8f0;
    color: var(--text-color);
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    width: auto;
}

.btn-action-gray:hover {
    background: #cbd5e1;
}

.data-section-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
}

.data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .data-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.data-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
}

.data-label {
    color: #64748b;
    font-weight: 500;
}

.data-value {
    color: var(--text-color);
    font-weight: 600;
    text-align: right;
}

/* Create Inspection Redesign */
.form-group {
    margin-bottom: 20px;
}

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

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background-color: #fff;
    color: var(--text-color);
    font-family: var(--font-family);
}

.form-control:focus {
    border-color: var(--primary-color);
}

.additional-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

/* Settings Pages */
.settings-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.settings-tab {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-color);
    background: transparent;
    transition: all 0.2s;
}

.settings-tab.active {
    background: var(--primary-color);
    color: white;
}

.settings-tab:hover:not(.active) {
    background: var(--sidebar-bg);
}

.settings-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.settings-table th {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border-color);
    color: #64748b;
    font-weight: 600;
}

.settings-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    vertical-align: middle;
}

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

/* Login Page Only */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color);
    padding: 20px;
}

/* Public Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.gallery-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.gallery-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}

.gallery-caption {
    padding: 15px;
    font-size: 0.95em;
}

.public-nav {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    margin-bottom: 30px;
}

/* Mobile Overrides (Responsive Fixes) */
@media (max-width: 768px) {
    .sidebar {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .profile-section {
        display: none !important;
    }
    .sidebar-actions,
    .sidebar-bottom {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
    }
    .nav-text, .btn-text {
        display: none !important;
    }
    .nav-icon, .sidebar-actions svg {
        margin-right: 0 !important;
    }
    .sidebar-actions .btn-primary {
        padding: 10px !important;
    }
    .nav-item, .logout-link {
        padding: 10px !important;
    }
}

/* Responsive Utilities */
.responsive-form-row {
    display: flex; 
    gap: 20px; 
    flex-wrap: wrap;
}
.responsive-form-row > .form-group {
    flex: 1 1 250px;
    margin-bottom: 20px !important;
}

/* Responsive Padding Utilities */
.card-pad-lg {
    padding: clamp(15px, 4vw, 40px) !important;
}
.card-pad-md {
    padding: clamp(15px, 3vw, 30px) !important;
}

@media (max-width: 768px) {
.room-main-card {
    padding: 40px 10px;
} 
.stat-card {
    padding: 30px 10px;
}

}