/* Modern CSS for Innovative Price Promotion & Admin Dashboard */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --bg-primary: #070d19;
    --bg-secondary: #0d1b2a;
    --bg-card: #15253e;
    --bg-card-hover: #1d3354;
    --color-primary: #f97316;
    --color-primary-hover: #ea580c;
    --color-primary-rgb: 249, 115, 22;
    --color-text-main: #f8fafc;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #64748b;
    --color-border: #1e293b;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 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);
    --shadow-glow: 0 0 20px rgba(249, 115, 22, 0.15);
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --border-radius: 12px;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--color-text-main);
    font-family: var(--font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Scrollbar Styles — Enhanced */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 8px;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-primary) 0%, #ea580c 100%);
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.3);
    transition: var(--transition-fast);
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #fba94c 0%, var(--color-primary) 100%);
    box-shadow: 0 0 8px rgba(var(--color-primary-rgb), 0.5);
}
::-webkit-scrollbar-corner {
    background: transparent;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.35; }
}

.fade-in {
    animation: fadeIn var(--transition-normal) forwards;
}

/* Landing Page Layout */
.landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 8%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(12px);
    background-color: rgba(7, 13, 25, 0.7);
    border-bottom: 1px solid var(--color-border);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-primary), #fdba74);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(var(--color-primary-rgb), 0.3);
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    font-family: var(--font-heading);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    color: var(--color-text-secondary);
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--color-text-main);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition-normal);
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.2);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(var(--color-primary-rgb), 0.3), var(--shadow-glow);
}

.btn-secondary {
    background-color: var(--bg-card);
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background-color: var(--bg-card-hover);
    transform: translateY(-2px);
}

.btn-danger {
    background-color: var(--color-danger);
    color: white;
}
.btn-danger:hover {
    background-color: #dc2626;
}

/* Hero Section */
.hero-section {
    padding: 160px 8% 100px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
    position: relative;
}

.hero-glow {
    position: absolute;
    top: 10%;
    left: 20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(var(--color-primary-rgb), 0.15) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
    animation: pulseGlow 8s infinite alternate;
}

.hero-content h1 {
    font-size: 56px;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1.5px;
}

.hero-content h1 span {
    color: var(--color-primary);
    background: linear-gradient(135deg, var(--color-primary) 30%, #fdb52a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 18px;
    color: var(--color-text-secondary);
    margin-bottom: 36px;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

.hero-preview {
    position: relative;
    display: flex;
    justify-content: center;
}

.mockup-wrapper {
    position: relative;
    border-radius: 36px;
    border: 8px solid #202b3c;
    background: #000;
    padding: 10px;
    width: 280px;
    height: 570px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.mockup-screen {
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary);
    border-radius: 26px;
    overflow: hidden;
    position: relative;
}

.mockup-header {
    height: 30px;
    background-color: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
}
.mockup-notch {
    width: 110px;
    height: 16px;
    background-color: #000;
    border-radius: 0 0 12px 12px;
}

.mockup-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: calc(100% - 30px);
}

/* Feature Grid */
.features-section {
    padding: 80px 8%;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--color-border);
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-header h2 {
    font-size: 36px;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--color-text-secondary);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.feature-card {
    background-color: var(--bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 32px;
    transition: var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(var(--color-primary-rgb), 0.3);
    box-shadow: var(--shadow-lg), 0 4px 20px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    font-size: 28px;
    color: var(--color-primary);
    margin-bottom: 20px;
    width: 56px;
    height: 56px;
    background-color: rgba(var(--color-primary-rgb), 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--color-text-secondary);
    font-size: 14px;
}

/* Footer */
.landing-footer {
    padding: 60px 8% 40px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text-muted);
    font-size: 14px;
}

/* Auth Page Layout */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(circle at top, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    position: relative;
}

.auth-card {
    background-color: rgba(21, 37, 62, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 440px;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    text-align: center;
}

.auth-logo {
    display: inline-flex;
    margin-bottom: 30px;
}

.auth-card h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.auth-card p {
    color: var(--color-text-secondary);
    margin-bottom: 32px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

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

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: 16px;
}

.form-control {
    width: 100%;
    background-color: rgba(7, 13, 25, 0.8);
    border: 1px solid rgba(var(--color-primary-rgb), 0.2);
    border-radius: 8px;
    padding: 12px 16px 12px 42px;
    color: var(--color-text-main);
    font-family: var(--font-body);
    font-size: 14px;
    transition: var(--transition-fast);
}

.form-control::placeholder {
    color: var(--color-text-muted);
    opacity: 0.7;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.18), 0 0 12px rgba(var(--color-primary-rgb), 0.1);
    background-color: rgba(7, 13, 25, 0.95);
}

.auth-card .btn {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
    padding: 12px;
}

.auth-error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--color-danger);
    color: var(--color-danger);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    text-align: left;
    display: none;
}

.auth-link {
    display: block;
    margin-top: 24px;
    font-size: 13px;
    color: var(--color-primary);
    font-weight: 500;
}

.auth-link:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

/* Admin Portal Layout */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 10;
}

.sidebar-brand {
    padding: 24px;
    border-bottom: 1px solid var(--color-border);
}

.sidebar-menu {
    list-style: none;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.sidebar-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--color-text-secondary);
    font-weight: 500;
    transition: var(--transition-fast);
}

.sidebar-item a:hover {
    background-color: rgba(255,255,255,0.03);
    color: var(--color-text-main);
}

.sidebar-item a i {
    transition: var(--transition-fast);
    opacity: 0.7;
}

.sidebar-item a:hover i {
    opacity: 1;
    color: var(--color-primary);
}

.sidebar-item.active a {
    background: linear-gradient(90deg, rgba(var(--color-primary-rgb), 0.18) 0%, rgba(var(--color-primary-rgb), 0.04) 100%);
    color: var(--color-primary);
    font-weight: 600;
    border-left: 3px solid var(--color-primary);
    padding-left: 13px;
    box-shadow: inset 0 0 12px rgba(var(--color-primary-rgb), 0.05);
}

.sidebar-item.active a i {
    opacity: 1;
    color: var(--color-primary);
    filter: drop-shadow(0 0 4px rgba(var(--color-primary-rgb), 0.6));
}

.sidebar-footer {
    padding: 20px 16px;
    border-top: 1px solid var(--color-border);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 0 8px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-info {
    overflow: hidden;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-role {
    font-size: 11px;
    color: var(--color-text-muted);
}

.main-content {
    flex-grow: 1;
    margin-left: 260px;
    padding: 40px;
    background-color: var(--bg-primary);
    min-height: 100vh;
    width: calc(100% - 260px);
    max-width: calc(100% - 260px);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.admin-title h1 {
    font-size: 32px;
    letter-spacing: -0.5px;
}

.admin-title p {
    color: var(--color-text-secondary);
    font-size: 14px;
}

/* Dashboard Cards / Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text-secondary);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    font-family: var(--font-heading);
}

.stat-icon {
    font-size: 20px;
    color: var(--color-primary);
}

.stat-sub {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* Custom dual value list for Revenue card */
.revenue-scroll-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.revenue-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: rgba(0,0,0,0.15);
    border-radius: 6px;
    font-size: 12px;
}

.revenue-row span:first-child {
    color: var(--color-text-secondary);
}

.revenue-row span:last-child {
    font-weight: 600;
}

/* Lists and Tables */
.content-card {
    background-color: var(--bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
}

.table-responsive {
    overflow-x: auto;
}

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

.admin-table th {
    padding: 16px 24px;
    background-color: rgba(255,255,255,0.01);
    border-bottom: 1px solid var(--color-border);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-secondary);
}

.admin-table td {
    padding: 18px 24px;
    border-bottom: 1px solid var(--color-border);
    font-size: 14px;
    color: var(--color-text-secondary);
}

.admin-table tbody tr {
    transition: var(--transition-fast);
}

.admin-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.015);
}

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

.text-white {
    color: var(--color-text-main) !important;
}

/* Badges */
.badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-draft { background-color: rgba(148, 163, 184, 0.15); color: #94a3b8; }
.badge-sent { background-color: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.badge-approved { background-color: rgba(16, 185, 129, 0.15); color: #10b981; }
.badge-completed { background-color: rgba(99, 102, 241, 0.15); color: #818cf8; }
.badge-rejected { background-color: rgba(239, 68, 68, 0.15); color: #ef4444; }

/* View action button — orange tinted, distinct from secondary */
.btn-view {
    background: rgba(var(--color-primary-rgb), 0.08);
    color: var(--color-primary);
    border: 1px solid rgba(var(--color-primary-rgb), 0.35);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-body);
    white-space: nowrap;
}
.btn-view:hover {
    background: rgba(var(--color-primary-rgb), 0.16);
    border-color: var(--color-primary);
    box-shadow: 0 0 12px rgba(var(--color-primary-rgb), 0.25);
    transform: translateY(-1px);
    color: var(--color-primary);
}
.dashboard-actions {
    display: flex;
    gap: 12px;
}

.search-bar {
    position: relative;
    width: 300px;
}

.search-input {
    width: 100%;
    background-color: var(--bg-primary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 8px 12px 8px 36px;
    font-size: 13px;
    color: var(--color-text-main);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-normal);
}

.modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background-color: var(--bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: var(--transition-normal);
    overflow: hidden;
}

.modal-backdrop.open .modal {
    transform: translateY(0);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(var(--color-primary-rgb), 0.2);
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.08) 0%, transparent 60%);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text-main);
}

/* Modal header icon highlight */
.modal-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}
.modal-icon.orange {
    background: linear-gradient(135deg, var(--color-primary), #fb923c);
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.45);
}
.modal-icon.blue {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.45);
}
.modal-icon.green {
    background: linear-gradient(135deg, #10b981, #34d399);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.45);
}
.modal-icon.purple {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.45);
}
.modal-icon.cyan {
    background: linear-gradient(135deg, #06b6d4, #22d3ee);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.45);
}

.modal-close {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    font-size: 18px;
    color: var(--color-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}
.modal-close:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(var(--color-primary-rgb), 0.15);
    background: rgba(0,0,0,0.1);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Room Estimate Detail Styling in Dashboard */
.room-container {
    background-color: rgba(0,0,0,0.15);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
}

.room-title {
    color: var(--color-primary);
    font-size: 16px;
}

.room-dimensions {
    font-size: 12px;
    color: var(--color-text-muted);
}

.service-card {
    background: linear-gradient(90deg, rgba(var(--color-primary-rgb), 0.07) 0%, rgba(255,255,255,0.01) 100%);
    border-left: 3px solid var(--color-primary);
    padding: 14px;
    margin-bottom: 10px;
    border-radius: 0 8px 8px 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
    transition: var(--transition-fast);
}
.service-card:hover {
    background: linear-gradient(90deg, rgba(var(--color-primary-rgb), 0.12) 0%, rgba(255,255,255,0.02) 100%);
}

.service-header {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.item-list {
    margin-left: 12px;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.item-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px dashed rgba(255,255,255,0.06);
    transition: var(--transition-fast);
}
.item-row:hover {
    color: var(--color-text-main);
}

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

.item-photo-link {
    color: var(--color-primary);
    font-size: 11px;
    margin-left: 8px;
}

.property-badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.property-badge {
    background-color: rgba(255,255,255,0.05);
    border: 1px solid var(--color-border);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
}

/* Print Layout (Only visible when printing) */
.print-only {
    display: none;
}

@media print {
    body {
        background-color: white !important;
        color: black !important;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    }
    
    /* Hide the entire app UI */
    .admin-container, .modal-backdrop {
        display: none !important;
    }
    
    /* Show ONLY the print container */
    .print-only {
        display: block !important;
        position: static !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Print Invoice Specific Styles */
    .invoice-header-row {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 32px;
    }
    .invoice-header-left, .invoice-header-right {
        display: flex;
        flex-direction: column;
    }
    .invoice-header-right {
        text-align: right;
    }
    .invoice-title {
        font-size: 20px;
        font-weight: bold;
        color: #1e3a8a !important; /* blue-900 */
        margin-bottom: 8px;
    }
    .invoice-bill-to-row {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 24px;
    }
    .invoice-section-title {
        font-weight: bold;
        color: #374151 !important; /* grey-700 */
        margin-bottom: 4px;
    }
    .invoice-project-title {
        font-size: 16px;
        font-weight: bold;
        margin-bottom: 12px;
    }
    .invoice-divider {
        border-bottom: 1px solid #9ca3af !important; /* grey-400 */
        margin: 16px 0;
    }
    .invoice-room {
        margin-bottom: 16px;
        page-break-inside: avoid;
    }
    .invoice-room-title {
        background-color: #e5e7eb !important; /* grey-200 */
        padding: 6px;
        font-weight: bold;
        font-size: 14px;
        text-transform: uppercase;
        margin-bottom: 8px;
    }
    .invoice-service {
        padding-left: 12px;
        margin-bottom: 12px;
    }
    .invoice-service-header {
        display: flex;
        justify-content: space-between;
        font-weight: bold;
    }
    .invoice-service-notes {
        font-style: italic;
        font-size: 10px;
        color: #374151 !important;
        margin: 2px 0 4px 0;
    }
    .invoice-table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 4px;
    }
    .invoice-table th {
        border-bottom: 1px solid #d1d5db !important; /* grey-300 */
        font-size: 10px;
        font-weight: bold;
        text-align: left;
        padding: 4px 0;
    }
    .invoice-table td {
        font-size: 10px;
        padding: 4px 0;
        vertical-align: top;
    }
    .invoice-table .text-right {
        text-align: right;
    }
    .invoice-total-row {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 8px;
        margin-bottom: 32px;
    }
    .invoice-total-label {
        font-size: 14px;
        font-weight: bold;
    }
    .invoice-total-value {
        font-size: 16px;
        font-weight: bold;
        color: #1e3a8a !important;
    }
    .invoice-footer-notes {
        font-size: 10px;
        color: #374151 !important;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 120px;
    }
    
    .hero-content h1 {
        font-size: 40px;
    }
    
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .sidebar {
        width: 70px;
    }
    
    .sidebar-brand .logo-text,
    .sidebar-item a span,
    .user-info,
    .sidebar-footer button span {
        display: none;
    }
    
    .main-content {
        margin-left: 70px;
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .dashboard-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .search-bar {
        width: 100%;
    }
}

/* Web Admin CRUD Styling */
.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--color-primary);
    margin-bottom: 6px;
    opacity: 0.9;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

select.form-control {
    padding-left: 16px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f97316' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
}

textarea.form-control {
    padding-left: 16px;
    resize: vertical;
}

.inline-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.btn-icon:hover {
    color: var(--color-primary);
    background-color: rgba(var(--color-primary-rgb), 0.1);
}

/* Todos os btn-icon dentro de grupos de ação ficam laranja por padrão */
.inline-actions .btn-icon,
.badge-actions .btn-icon,
.btn-icon.destructive {
    color: var(--color-primary);
}

.inline-actions .btn-icon:hover,
.badge-actions .btn-icon:hover,
.btn-icon.destructive:hover {
    color: var(--color-primary);
    background-color: rgba(var(--color-primary-rgb), 0.12);
    box-shadow: 0 0 8px rgba(var(--color-primary-rgb), 0.2);
}

/* Table row secondary action buttons — edit/trash icon orange */
.btn.btn-secondary.destructive {
    color: var(--color-primary) !important;
    border-color: rgba(var(--color-primary-rgb), 0.25) !important;
    background: rgba(var(--color-primary-rgb), 0.05) !important;
}
.btn.btn-secondary.destructive:hover {
    background: rgba(var(--color-primary-rgb), 0.12) !important;
    box-shadow: 0 0 10px rgba(var(--color-primary-rgb), 0.2);
}

/* Inline text-link actions: "+ Add Scoped Service", "+ Add Item" */
.add-inline-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 600;
    margin-top: 10px;
    padding: 5px 10px;
    border-radius: 6px;
    text-decoration: none;
    opacity: 0.75;
    background: rgba(var(--color-primary-rgb), 0.0);
    border: 1px dashed rgba(var(--color-primary-rgb), 0.3);
    transition: all var(--transition-fast);
    letter-spacing: 0.2px;
}
.add-inline-link:hover {
    opacity: 1;
    background: rgba(var(--color-primary-rgb), 0.08);
    border-color: rgba(var(--color-primary-rgb), 0.6);
    box-shadow: 0 0 8px rgba(var(--color-primary-rgb), 0.15);
    transform: translateX(2px);
}

.property-badge-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255,255,255,0.03);
    border: 1px solid var(--color-border);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
}

.property-badge-info {
    display: flex;
    flex-direction: column;
}

.badge-actions {
    display: flex;
    gap: 4px;
    margin-left: 8px;
    border-left: 1px solid var(--color-border);
    padding-left: 8px;
}

/* Room Protection Presets UI */
.preset-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}
.preset-badge:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--color-text-main);
}
.preset-badge.active {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}
.preset-chip {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    background-color: var(--bg-card);
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-block;
}
.preset-chip:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--color-secondary);
}
.preset-chip.active {
    background-color: var(--color-secondary);
    color: black;
    border-color: var(--color-secondary);
}

/* Quote Modal Layouts */
.quote-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    border-bottom: 3px solid var(--color-primary);
    padding-bottom: 20px;
}
.quote-header-left {
    display: flex;
    gap: 16px;
    align-items: center;
}
.modal-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
    background-color: rgba(255,255,255,0.02);
    border-left: 4px solid var(--color-primary);
    padding: 16px;
    border-radius: 0 8px 8px 0;
}

/* ========================================= */
/* Responsive Layout (Auto Resizing) */
/* ========================================= */

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    /* Hide full sidebar, make it an icon bar */
    .sidebar {
        width: 70px;
    }
    
    .sidebar-brand {
        padding: 24px 10px;
        justify-content: center;
    }
    
    .sidebar-brand .logo-text {
        display: none;
    }
    
    .sidebar-item a span {
        display: none;
    }
    
    .user-info {
        display: none;
    }
    
    .sidebar-footer .btn span {
        display: none;
    }
    
    .main-content {
        margin-left: 70px;
        padding: 24px 16px;
        width: calc(100% - 70px);
        max-width: calc(100% - 70px);
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .dashboard-actions-group, .dashboard-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .dashboard-actions {
        flex: 1;
        justify-content: flex-end;
    }

    .form-row {
        flex-direction: column;
        gap: 12px;
    }

    .search-bar {
        width: 100%;
    }

    /* Wrap tables to scroll */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .admin-table {
        min-width: 800px;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    
    /* Make quote modal responsive */
    .quote-header-flex {
        flex-direction: column;
        gap: 16px;
    }
    .modal-grid-2 {
        grid-template-columns: 1fr;
    }
    
    /* Make rooms block responsive */
    .view-quote-section {
        padding: 16px;
    }
    .service-item-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .service-item-actions {
        margin-top: 8px;
        align-self: flex-end;
    }
}

/* Map View Styling */
#property-map {
    width: 100%;
    height: calc(100vh - 120px);
    z-index: 1; /* keep it below modals/header */
}
.map-legend {
    background: white;
    padding: 12px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    font-size: 13px;
    line-height: 22px;
    color: #1f2937;
    min-width: 150px;
}
.map-legend h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
}
.map-legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}
.map-legend-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 8px;
    border: 2px solid white;
    box-shadow: 0 0 2px rgba(0,0,0,0.4);
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.spin {
    animation: spin 1s linear infinite;
}
