/* ========================================================
   KORUPARK PLATFORM — LIGHT THEME (5leventkoruparkyonetim.com Style)
   ======================================================== */

:root {
    --primary-color: #0A1628;
    --primary-hover: #1E3A5F;
    --accent-color: #C53030;
    --accent-gradient: linear-gradient(135deg, #9B2C2C 0%, #C53030 100%);

    /* Light backgrounds */
    --bg-base: #F8F9FA;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --bg-glass-hover: rgba(255, 255, 255, 0.95);

    /* Text */
    --text-main: #0A1628;
    --text-body: #475569;
    --text-muted: #64748b;
    --text-bright: #0A1628;

    /* Borders */
    --border-color: #e2e8f0;
    --border-glass: rgba(10, 22, 40, 0.08);

    /* Glass effects */
    --glass-blur: 20px;
    --glass-saturate: 1.8;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(10, 22, 40, 0.06);
    --shadow-md: 0 4px 16px rgba(10, 22, 40, 0.1);
    --shadow-lg: 0 12px 40px rgba(10, 22, 40, 0.15);

    /* Radii */
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
    /* Grid pattern like reference site */
    background-image:
        repeating-linear-gradient(45deg, rgba(10, 22, 40, 0.025) 0px, rgba(10, 22, 40, 0.025) 1px, transparent 1px, transparent 20px),
        repeating-linear-gradient(-45deg, rgba(10, 22, 40, 0.025) 0px, rgba(10, 22, 40, 0.025) 1px, transparent 1px, transparent 20px);
}

/* Ambient glow effects */
body::before {
    content: '';
    position: fixed;
    top: -200px;
    left: 0;
    width: 100%;
    height: 500px;
    background:
        radial-gradient(ellipse 60% 50% at 20% 0%, rgba(30, 58, 95, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 0%, rgba(30, 58, 95, 0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ========================================================
   LAYOUT
   ======================================================== */
.app-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ========================================================
   HEADER — Sticky Banner
   ======================================================== */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    margin: -2rem -2rem 2rem -2rem;
    padding: 1rem 2rem;
    text-align: left;
    display: flex;
    gap: 1rem;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
    background: rgba(248, 249, 250, 0.92);
    backdrop-filter: blur(16px) saturate(1.5);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
}

.header-title { flex-grow: 1; }

header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--primary-color);
    margin-bottom: 0.1rem;
    line-height: 1.2;
}

header p {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 800px;
}

.logo-container { flex-shrink: 0; }

.app-logo {
    height: 60px;
    width: auto;
    display: block;
}

/* Header contacts */
.header-contacts {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: stretch;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.7rem;
    background: var(--bg-glass);
    backdrop-filter: blur(12px) saturate(1.5);
    -webkit-backdrop-filter: blur(12px) saturate(1.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.78rem;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: var(--bg-glass-hover);
    border-color: var(--primary-hover);
    box-shadow: var(--shadow-sm);
}

.contact-role {
    font-weight: 700;
    color: var(--accent-color);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.contact-name {
    font-weight: 500;
    color: var(--text-main);
}

.contact-actions {
    display: flex;
    gap: 0.35rem;
    margin-left: 0.25rem;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.contact-icon.wa {
    color: #25d366;
    background: #e8faf0;
}

.contact-icon.wa:hover {
    background: #25d366;
    color: white;
    transform: scale(1.15);
    box-shadow: 0 0 12px rgba(37, 211, 102, 0.3);
}

.contact-icon.tel {
    color: var(--primary-color);
    background: #eef2ff;
}

.contact-icon.tel:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.15);
    box-shadow: 0 0 12px rgba(10, 22, 40, 0.2);
}

/* ========================================================
   YÖNETIM INLINE CARD
   ======================================================== */
.contact-yonetim-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 0.5rem 0.7rem;
}

.yonetim-members {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.member-separator {
    color: var(--border-color);
    font-weight: 300;
    margin: 0 0.1rem;
}

/* ========================================================
   TABS NAVIGATION
   ======================================================== */
.app-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--bg-glass);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    padding: 0.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow-x: auto;
    white-space: nowrap;
}

.tab-btn {
    padding: 0.7rem 1.3rem;
    background: transparent;
    color: var(--text-muted);
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: auto;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(10, 22, 40, 0.04);
}

.tab-btn.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(197, 48, 48, 0.25);
}

/* ========================================================
   TAB CONTENT
   ======================================================== */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-content.active {
    display: block;
}

.tab-content.active.main-layout {
    display: grid;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================================
   CONSTRUCTION / PLACEHOLDER
   ======================================================== */
.construction-message {
    text-align: center;
    padding: 5rem 2rem;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px dashed var(--border-color);
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
    max-width: 800px;
    margin: 0 auto;
}

.construction-message h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.placeholder-text {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border-color);
    font-size: 1.1rem;
}

/* ========================================================
   FORMS / INPUTS
   ======================================================== */
.text-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--bg-base);
    color: var(--text-main);
}

.text-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(10, 22, 40, 0.08);
    background: #ffffff;
}

.text-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.textarea-input {
    resize: vertical;
    min-height: 120px;
}

.field-hint {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
    font-style: italic;
    opacity: 0.8;
}

.main-layout {
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    align-items: start;
}

/* ========================================================
   FORM CARDS
   ======================================================== */
.form-card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    position: sticky;
    top: 2rem;
    transition: all 0.3s ease;
}

.form-card h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-main);
}

.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--bg-base);
    cursor: pointer;
    color: var(--text-main);
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(10, 22, 40, 0.08);
    background: #ffffff;
}

.info-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: #166534;
    line-height: 1.6;
}

.action-buttons {
    margin-top: 1.5rem;
}

/* ========================================================
   BUTTONS
   ======================================================== */
button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: var(--text-muted);
    color: white;
}

.primary-btn {
    background: var(--accent-gradient);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(197, 48, 48, 0.2);
}

.primary-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(197, 48, 48, 0.3);
    filter: brightness(1.08);
}

.primary-btn:not(:disabled):active {
    transform: translateY(0);
}

/* ========================================================
   PREVIEW / DOCUMENT
   ======================================================== */
.preview-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.print-only { display: none; }

.screen-document {
    background-color: white;
    padding: 40px 50px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-bottom: 3rem;
    font-family: 'Times New Roman', Times, serif;
    color: #000;
}

.screen-badge {
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.screen-grid {
    column-count: 2;
    column-gap: 60px;
    margin-top: 15px;
}

.screen-grid .signature-item {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 12px;
}

/* ========================================================
   SHARED DOCUMENT STYLES
   ======================================================== */
.document-content {
    line-height: 1.25;
    font-size: 13.5px;
    text-align: justify;
}

.document-content p { margin-bottom: 0.5rem; }

.document-content h3 {
    text-align: left;
    font-size: 14.5px;
    font-weight: bold;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.document-content h4 {
    font-size: 13.5px;
    font-weight: bold;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    text-align: left;
}

.document-signatures { margin-top: 1.5rem; }

.signature-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    white-space: nowrap;
}

.sig-number {
    display: inline-block;
    min-width: 45px;
    font-weight: bold;
}

.sig-dots {
    color: #000;
    letter-spacing: 2px;
}

.signature-block-title {
    text-align: left;
    font-weight: bold;
    margin-bottom: 10px;
}

.ol-list {
    margin-left: 20px;
    margin-bottom: 1rem;
}

.ol-list li {
    margin-bottom: 0.25rem;
    padding-left: 5px;
}

.signature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(15, minmax(26px, auto));
    grid-auto-flow: column;
    row-gap: 16px;
    column-gap: 50px;
    margin-top: 15px;
}

/* ========================================================
   PDF VIEWER
   ======================================================== */
.pdf-viewer-container {
    display: flex;
    flex-direction: column;
    height: 80vh;
    min-height: 600px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.pdf-nav {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    white-space: nowrap;
}

.pdf-btn, .yp-btn {
    padding: 0.6rem 1rem;
    background: var(--bg-base);
    color: var(--text-body);
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pdf-btn:hover, .yp-btn:hover {
    background: var(--border-color);
    color: var(--text-main);
}

.pdf-btn.active, .yp-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: var(--accent-color);
}

.pdf-display-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.pdf-toolbar {
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#pdfTitle, #ypTitle {
    font-weight: 600;
    color: var(--text-main);
}

.pdf-dl-btn {
    width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.pdf-frame-wrapper {
    flex-grow: 1;
    background: #e2e8f0;
    position: relative;
}

.pdf-frame-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ========================================================
   MAHAL LİSTESİ
   ======================================================== */
.mahal-container {
    max-width: 1200px;
    margin: 0 auto;
}

.mahal-header {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.mahal-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.mahal-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.mahal-search-box { max-width: 450px; }

.mahal-room-nav {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.room-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.85rem 1.1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    min-width: 100px;
    width: auto;
    color: var(--text-main);
}

.room-btn:hover {
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.room-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 4px 16px rgba(197, 48, 48, 0.25);
}

.room-icon { font-size: 1.5rem; }
.room-name { font-size: 0.75rem; font-weight: 600; text-align: center; line-height: 1.2; }
.room-count { font-size: 0.65rem; opacity: 0.7; }

.room-btn.active .room-name,
.room-btn.active .room-count { color: white; }

.mahal-detail-area {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    min-height: 300px;
}

.room-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.room-detail-header h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.detail-count {
    font-size: 0.85rem;
    background: #f0fdf4;
    color: #166534;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-weight: 600;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.detail-card {
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: all 0.3s ease;
}

.detail-card:hover {
    border-color: var(--primary-hover);
    box-shadow: 0 2px 12px rgba(10, 22, 40, 0.08);
    transform: translateY(-2px);
}

.detail-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-value {
    font-size: 0.85rem;
    color: var(--text-body);
    line-height: 1.5;
}

.detail-value strong {
    color: var(--text-main);
    display: block;
    margin-bottom: 0.15rem;
}

.detail-room-tag {
    display: inline-block;
    font-size: 0.65rem;
    background: var(--accent-gradient);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.color-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    vertical-align: middle;
    margin-right: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ========================================================
   YÖNETİM PLANI CARD GRID
   ======================================================== */
.yp-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.yp-doc-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    width: auto;
    position: relative;
    overflow: hidden;
}

/* Shimmer on hover */
.yp-doc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(10, 22, 40, 0.02), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.yp-doc-card:hover::before {
    left: 100%;
}

.yp-doc-card:hover {
    border-color: var(--primary-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.yp-doc-card.yp-main {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
    border-color: #fecaca;
    padding: 0.85rem 1rem;
}

.yp-doc-icon { font-size: 1.4rem; flex-shrink: 0; }
.yp-doc-info { flex-grow: 1; position: relative; z-index: 1; }
.yp-doc-info h4 { font-size: 0.88rem; font-weight: 600; margin-bottom: 0.1rem; color: var(--text-main); }
.yp-doc-info span { font-size: 0.72rem; color: var(--text-muted); line-height: 1.3; }

.yp-doc-action {
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-color);
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

.file-size {
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

/* ========================================================
   FOOTER
   ======================================================== */
.app-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
}

.footer-content {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.domain-links {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.domain-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: var(--bg-base);
    border-radius: 9999px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.domain-links a:hover {
    background: var(--accent-gradient);
    color: white;
    border-color: var(--accent-color);
}

/* ========================================================
   FEEDBACK FORM OVERRIDES
   ======================================================== */
.feedback-form h2 {
    color: var(--primary-color) !important;
}

.feedback-form p {
    color: var(--text-muted) !important;
}

/* ========================================================
   SCROLLBAR
   ======================================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(10, 22, 40, 0.12);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(10, 22, 40, 0.2);
}

/* ========================================================
   RESPONSIVE — TABLET
   ======================================================== */
@media (max-width: 1024px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .main-layout {
        grid-template-columns: 1fr;
    }
    .form-card {
        position: static;
    }
    .screen-document {
        padding: 25px;
    }
    .screen-grid {
        column-count: 1;
    }
    .header-contacts {
        width: 100%;
    }
    .yp-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

/* ========================================================
   RESPONSIVE — MOBILE
   ======================================================== */
@media (max-width: 640px) {
    .app-container {
        padding: 0.75rem;
    }

    header {
        padding-bottom: 1rem;
        margin-bottom: 1rem;
        gap: 0.75rem;
    }

    header h1 { font-size: 1.4rem; }
    header p { font-size: 0.85rem; }
    .app-logo { height: 42px; }

    .header-contacts {
        display: flex;
        gap: 0.4rem;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .header-contacts::-webkit-scrollbar { display: none; }

    .contact-item {
        flex-shrink: 0;
        font-size: 0.72rem;
        padding: 0.3rem 0.5rem;
    }

    .app-tabs {
        gap: 0.25rem;
        padding: 0.35rem;
        margin-bottom: 1rem;
        border-radius: var(--radius-lg);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .app-tabs::-webkit-scrollbar { display: none; }

    .tab-btn {
        padding: 0.5rem 0.85rem;
        font-size: 0.78rem;
        flex-shrink: 0;
    }

    .yp-card-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .yp-doc-card { padding: 1rem; gap: 0.75rem; }
    .yp-doc-icon { font-size: 1.5rem; }
    .yp-doc-info h4 { font-size: 0.9rem; }
    .yp-doc-info span { font-size: 0.75rem; }
    .yp-doc-action { font-size: 0.78rem; }

    .mahal-header { padding: 1.25rem; }
    .mahal-header h2 { font-size: 1.15rem; }

    .mahal-room-nav {
        gap: 0.5rem;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .mahal-room-nav::-webkit-scrollbar { display: none; }

    .room-btn { min-width: 80px; padding: 0.65rem 0.8rem; flex-shrink: 0; }
    .room-icon { font-size: 1.2rem; }
    .room-name { font-size: 0.68rem; }
    .mahal-detail-area { padding: 1rem; }
    .detail-grid { grid-template-columns: 1fr; }

    .form-card { padding: 1.25rem; border-radius: var(--radius-lg); }
    .feedback-form { margin: 0 !important; }

    .pdf-viewer-container { height: 60vh; min-height: 400px; }
    .pdf-nav { padding: 0.5rem; gap: 0.35rem; }
    .pdf-btn { padding: 0.45rem 0.75rem; font-size: 0.78rem; }

    .app-footer { margin-top: 2rem; }
    .domain-links { gap: 0.5rem; }
    .domain-links a { font-size: 0.8rem; padding: 0.4rem 0.8rem; }
    .inline-group { grid-template-columns: 1fr !important; }
    .construction-message { padding: 3rem 1.5rem; }
    .placeholder-text { padding: 3rem 1.5rem; }

}

/* ========================================================
   PRINT STYLES
   ======================================================== */
@media print {
    @page {
        margin: 1cm 1.5cm 0.5cm 1.5cm;
    }
    body {
        background-color: white;
        background-image: none;
        color: #000;
    }
    body::before { display: none; }
    .app-container {
        padding: 0;
        max-width: none;
    }
    .no-print { display: none !important; }
    .print-only { display: block !important; }

    .tab-content { display: none !important; }
    #tab-ihtarname { display: block !important; }

    .preview-section { gap: 0; }
    .document-page {
        box-shadow: none;
        padding: 0;
        margin: 0;
        max-width: none;
        width: 100%;
        height: 98vh;
        box-sizing: border-box;
        border: none;
        display: flex;
        flex-direction: column;
        page-break-after: always;
        break-after: page;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    .document-page:last-child {
        page-break-after: auto;
        break-after: auto;
    }
    .document-content {
        display: flex;
        flex-direction: column;
        flex-grow: 1;
    }
    .document-signatures {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        margin-top: 15px;
    }
    .signature-grid {
        flex-grow: 1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(15, 1fr) !important;
        row-gap: 0 !important;
        margin-top: 5px;
    }
    .signature-item {
        display: flex;
        align-items: flex-end;
        padding-bottom: 2px !important;
        margin-bottom: 0 !important;
    }
}
