/* Kéki Lapszabászat - Scoped CSS for Joomla embed */

/* ========== Design Tokens ========== */
:root {
    --brand-white: #FAFFFF;
    --brand-darkblue: #304459;
    --brand-blue: #306590;
    --brand-blue-light: #3a7ab0;
    --brand-beige: #C3B29B;
    --bg-main: #f4f5f7;
    --bg-card: #ffffff;
    --text-primary: #304459;
    --text-secondary: #6b7a8d;
    --text-muted: #9aa5b1;
    --border-light: #e2e6ea;
    --border-focus: #306590;
    --green: #34C759;
    --red: #FF3B30;
    --orange: #FF9500;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 50px;
}

/* ========== Reset & Base ========== */
#keki-app, #keki-app *, #keki-app *::before, #keki-app *::after { box-sizing: border-box; margin: 0; padding: 0; }

#keki-app {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-bottom: 80px; /* Space for floating bar */
}

#keki-app h1, #keki-app h2 { text-align: center; }


/* ========== Hero Section ========== */
#keki-app .hero-section {
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(170deg, var(--bg-card) 0%, var(--bg-main) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

#keki-app .hero-section::before {
    content: '';
    position: absolute;
    top: 10%;
    left: -10%;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-blue), var(--green));
    opacity: 0.08;
    animation: float 6s ease-in-out infinite;
}

#keki-app .hero-section::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: -5%;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--red));
    opacity: 0.08;
    animation: float 8s ease-in-out infinite reverse;
}

#keki-app .hero-content {
    max-width: 700px;
    padding: 40px 24px 28px;
    z-index: 10;
}

#keki-app .hero-title {
    font-size: clamp(26px, 5vw, 40px);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 10px;
    letter-spacing: -1.5px;
    color: var(--brand-darkblue);
    animation: fadeInUp 0.8s ease-out;
}

#keki-app .hero-subtitle {
    font-size: 17px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease-out 0.15s both;
}

/* 3-step guide */
#keki-app .steps-guide {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
    animation: fadeInUp 0.8s ease-out 0.25s both;
    flex-wrap: wrap;
}

#keki-app .step-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--text-secondary);
}

#keki-app .step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

#keki-app .step-arrow {
    color: var(--text-muted);
    font-size: 14px;
}

#keki-app .cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--brand-blue);
    color: white;
    padding: 16px 36px;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-size: 17px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(48, 101, 144, 0.3);
    animation: fadeInUp 0.8s ease-out 0.35s both;
}

#keki-app .cta-button:hover {
    background: var(--brand-blue-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(48, 101, 144, 0.35);
}

/* ========== Section Container ========== */
#keki-app .section-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ========== Two Column Layout ========== */
#keki-app .two-col-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 55% 45%;
    gap: 24px;
    align-items: start;
}

#keki-app .col-left { min-width: 0; }

#keki-app .col-right {
    position: sticky;
    top: 24px;
    min-width: 0;
}

/* ========== Form Card ========== */
#keki-app .form-section { padding: 24px 0; }

#keki-app .form-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

#keki-app .section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--brand-blue);
    letter-spacing: -0.5px;
}

#keki-app .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

#keki-app .form-group { position: relative; }

#keki-app .form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

#keki-app .form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

#keki-app .btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 14px;
    color: var(--brand-blue);
}

#keki-app .form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 16px;
    background: var(--bg-card);
    transition: all 0.2s ease;
    font-family: inherit;
    color: var(--text-primary);
}

#keki-app .form-input:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(48, 101, 144, 0.12);
}

#keki-app .help-text {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.4;
}

/* ========== Material Selector ========== */
#keki-app .material-selector-container { margin-bottom: 8px; }

#keki-app .material-selector-btn {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
}

#keki-app .material-selector-btn:hover { border-color: var(--brand-blue); }

#keki-app .material-selector-btn.has-selection {
    border-color: var(--brand-blue);
    background: rgba(48, 101, 144, 0.04);
}

#keki-app .material-selector-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

#keki-app .material-selector-value { font-size: 15px; font-weight: 600; }
#keki-app .material-selector-placeholder { color: var(--text-muted); }

#keki-app .material-selector-icon {
    font-size: 16px;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

#keki-app .material-selector-btn.open .material-selector-icon { transform: rotate(180deg); }

/* ========== Material Picker Modal ========== */
#keki-app .material-picker-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    padding: 20px;
    overflow-y: auto;
}

#keki-app .material-picker-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

#keki-app .material-picker-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 28px;
    max-width: 900px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
    box-shadow: var(--shadow-lg);
}

#keki-app .material-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}

#keki-app .material-picker-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

#keki-app .material-picker-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-main);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

#keki-app .material-picker-close:hover { background: var(--border-light); }

#keki-app .material-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

#keki-app .material-item {
    background: var(--bg-main);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

#keki-app .material-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-blue);
}

#keki-app .material-item.selected {
    border-color: var(--brand-blue);
    box-shadow: 0 4px 16px rgba(48, 101, 144, 0.25);
}

#keki-app .material-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

#keki-app .material-code {
    padding: 8px;
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-card);
    word-wrap: break-word;
    line-height: 1.2;
}

/* ========== Accordion ========== */
#keki-app .accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 16px 0;
    user-select: none;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 0;
    transition: margin 0.3s ease;
}

#keki-app .accordion-header.open {
    margin-bottom: 20px;
    border-bottom-color: transparent;
}

#keki-app .accordion-header .section-title {
    margin-bottom: 0;
    font-size: 20px;
}

#keki-app .accordion-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-main);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}

#keki-app .accordion-header.open .accordion-toggle { transform: rotate(180deg); }

#keki-app .accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

#keki-app .accordion-body.open { max-height: 600px; }

/* ========== Edge Toggle Buttons ========== */
#keki-app .edges-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

#keki-app .edge-group { margin-bottom: 4px; }

#keki-app .edge-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

#keki-app .edge-label-icon {
    font-size: 16px;
    color: var(--brand-blue);
}

#keki-app .edge-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

#keki-app .edge-btn {
    flex: 1;
    min-width: 55px;
    padding: 10px 6px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
}

#keki-app .edge-btn:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}

#keki-app .edge-btn.active {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    color: white;
}

#keki-app .edge-btn.active-none {
    background: var(--bg-main);
    border-color: var(--text-muted);
    color: var(--text-primary);
}

/* ========== Extra Options ========== */
#keki-app .extra-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

#keki-app .checkbox-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

#keki-app .checkbox-card:hover { border-color: var(--brand-blue); }

#keki-app .checkbox-card.checked {
    border-color: var(--brand-blue);
    background: rgba(48, 101, 144, 0.04);
}

#keki-app .checkbox-card input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--brand-blue);
}

#keki-app .feher-thickness-selector {
    display: none;
    grid-column: 1 / -1;
    padding: 12px 16px;
    background: rgba(48, 101, 144, 0.04);
    border-radius: var(--radius-sm);
    border: 2px solid var(--brand-blue);
}

#keki-app .feher-thickness-selector.open {
    display: block;
}

#keki-app .feher-thickness-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

#keki-app .feher-thickness-options {
    display: flex;
    gap: 8px;
}

#keki-app .feher-thickness-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    background: white;
}

#keki-app .feher-thickness-options label:hover {
    border-color: var(--brand-blue);
}

#keki-app .feher-thickness-options input[type="radio"]:checked + span {
    color: var(--brand-blue);
}

#keki-app .feher-thickness-options label:has(input:checked) {
    border-color: var(--brand-blue);
    background: rgba(48, 101, 144, 0.08);
}

#keki-app .feher-thickness-options input[type="radio"] {
    accent-color: var(--brand-blue);
    width: 16px;
    height: 16px;
}

#keki-app .duplungolas-info {
    background: rgba(48, 101, 144, 0.04);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    border-left: 4px solid var(--brand-blue);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

#keki-app .duplungolas-info h4 {
    color: var(--brand-blue);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    text-align: left;
}

/* ========== Add Button ========== */
#keki-app .add-button {
    background: var(--brand-blue);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: var(--radius-full);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 28px auto 0;
    min-width: 240px;
    box-shadow: 0 6px 20px rgba(48, 101, 144, 0.25);
}

#keki-app .add-button:hover {
    background: var(--brand-blue-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(48, 101, 144, 0.3);
}

#keki-app .add-button:active { transform: translateY(0); }

/* ========== Live Preview ========== */
#keki-app .live-preview {
    margin-top: 0;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.3s ease;
}

#keki-app .live-preview.has-data { border-color: var(--brand-blue); }

#keki-app .live-preview-header {
    background: var(--bg-main);
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

#keki-app .live-preview-header i { color: var(--brand-blue); }

#keki-app .live-preview-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 56px 24px 32px 64px;
    background: var(--bg-card);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

#keki-app .live-preview-info { width: 100%; }

#keki-app .live-preview-board {
    position: relative;
    width: 200px;
    min-width: 200px;
    height: 120px;
    margin: 0;
    background: linear-gradient(0deg,
        #f5f5f5 0%, #fff 10%, #f0f0f0 20%,
        #fafafa 35%, #f5f5f5 50%, #fff 65%,
        #f0f0f0 80%, #f5f5f5 100%);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    transition: border-color 0.3s ease;
    flex-shrink: 0;
    overflow: visible;
}

#keki-app .live-preview.has-data .live-preview-board { border-color: var(--brand-blue); }

#keki-app .lp-dim-h, #keki-app .lp-dim-v {
    position: absolute;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    background: rgba(255,255,255,0.92);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 3;
}

/* Hossz: felul kozepen, az elcimke folott */
#keki-app .lp-dim-h {
    top: -42px;
    left: 50%;
    transform: translateX(-50%);
}

/* Szelesseg: bal oldalt kozepen, az elcimke mellett kijjebb */
#keki-app .lp-dim-v {
    left: -52px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
}

#keki-app .lp-grain {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 1;
}

#keki-app .lp-grain i { font-size: 13px; }

#keki-app .lp-edge {
    position: absolute;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-card);
    padding: 3px 8px;
    border-radius: 5px;
    border: 1.5px solid var(--border-light);
    transition: all 0.2s ease;
    white-space: nowrap;
    z-index: 2;
    cursor: pointer;
    user-select: none;
}

#keki-app .lp-edge:hover {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 2px rgba(48, 101, 144, 0.15);
}

#keki-app .lp-edge-top:hover, #keki-app .lp-edge-bottom:hover { transform: translateX(-50%) scale(1.08); }
#keki-app .lp-edge-left:hover { transform: translateY(-50%) rotate(-90deg) scale(1.08); }
#keki-app .lp-edge-right:hover { transform: translateY(-50%) rotate(90deg) scale(1.08); }

#keki-app .lp-edge.has-edge {
    color: white;
    border-color: var(--brand-blue);
    background: var(--brand-blue);
}

#keki-app .lp-edge-top { top: -14px; left: 50%; transform: translateX(-50%); }
#keki-app .lp-edge-bottom { bottom: -14px; left: 50%; transform: translateX(-50%); }
#keki-app .lp-edge-left { left: -14px; top: 50%; transform: translateY(-50%) rotate(-90deg); }
#keki-app .lp-edge-right { right: -14px; top: 50%; transform: translateY(-50%) rotate(90deg); }

#keki-app .live-preview-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#keki-app .lp-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
}

#keki-app .lp-info-row:last-child { border-bottom: none; }
#keki-app .lp-info-label { font-weight: 600; color: var(--text-secondary); }
#keki-app .lp-info-value { font-weight: 600; color: var(--text-primary); text-align: right; }

@media (max-width: 768px) {
    #keki-app .live-preview-body {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
    #keki-app .live-preview-board { width: 180px; min-width: 180px; height: 110px; margin: 14px 18px; }
}

/* ========== Table / Cards Section ========== */
#keki-app .table-section { padding: 8px 0 24px; }

#keki-app .table-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

#keki-app .table-container table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

#keki-app .table-container th {
    background: var(--bg-main);
    padding: 14px 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#keki-app .table-container td {
    padding: 14px 12px;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#keki-app .table-container tr:hover { background: rgba(48, 101, 144, 0.02); }

#keki-app .table-container td[contenteditable="true"] {
    cursor: text;
    transition: background 0.2s ease;
}

#keki-app .table-container td[contenteditable="true"]:focus {
    background: rgba(48, 101, 144, 0.05);
    outline: 2px solid var(--brand-blue);
    border-radius: 6px;
}

#keki-app .table-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
}

#keki-app .table-action-btn {
    background: none;
    border: none;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--brand-blue);
    transition: all 0.2s ease;
    font-size: 16px;
}

#keki-app .table-action-btn:hover {
    background: var(--bg-main);
}

#keki-app .table-action-btn.delete:hover { color: var(--red); }

/* Mobile Cards */
#keki-app .mobile-table {
    display: none;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
}

#keki-app .mobile-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

#keki-app .mobile-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 15px;
}

#keki-app .mobile-field:last-of-type { border-bottom: none; }

#keki-app .mobile-field-label {
    font-weight: 600;
    color: var(--brand-blue);
    font-size: 14px;
}

#keki-app .mobile-field-value {
    color: var(--text-primary);
    text-align: right;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

#keki-app .mobile-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

#keki-app .mobile-action-btn {
    flex: 1;
    padding: 14px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 48px;
}

#keki-app .mobile-action-btn.edit { background: var(--brand-blue); color: white; }
#keki-app .mobile-action-btn.delete { background: var(--red); color: white; }

/* ========== Empty State ========== */
#keki-app .empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

#keki-app .empty-state i { font-size: 40px; margin-bottom: 12px; display: block; }
#keki-app .empty-state p { font-size: 16px; }

/* ========== Contact Section ========== */
#keki-app .contact-section { padding: 24px 0; }

/* ========== Modal ========== */
#keki-app .modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

#keki-app .modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 36px;
    max-width: 550px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
    border: 1px solid var(--border-light);
}

#keki-app .modal-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

#keki-app .board-preview {
    position: relative;
    width: 260px;
    height: 130px;
    background: linear-gradient(0deg,
        #f5f5f5 0%, #ffffff 8%, #f0f0f0 15%,
        #fafafa 22%, #f5f5f5 30%, #ffffff 38%,
        #f0f0f0 45%, #f5f5f5 52%, #fafafa 60%,
        #f0f0f0 68%, #ffffff 75%, #f5f5f5 82%,
        #fafafa 90%, #f0f0f0 100%);
    border: 3px solid var(--brand-blue);
    border-radius: var(--radius-md);
    margin: 24px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

#keki-app .board-preview::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(0deg,
        transparent, transparent 6px,
        rgba(0,0,0,0.08) 6px, rgba(0,0,0,0.08) 7px,
        transparent 7px, transparent 15px,
        rgba(0,0,0,0.05) 15px, rgba(0,0,0,0.05) 16px,
        transparent 16px, transparent 30px,
        rgba(0,0,0,0.12) 30px, rgba(0,0,0,0.12) 32px,
        transparent 32px, transparent 45px,
        rgba(0,0,0,0.06) 45px, rgba(0,0,0,0.06) 47px
    );
    border-radius: 13px;
    pointer-events: none;
}

#keki-app .board-preview .dimension {
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,0.95);
    padding: 4px 10px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    font-size: 14px;
}

#keki-app .board-edge {
    position: absolute;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-blue);
    background: var(--bg-card);
    padding: 3px 7px;
    border-radius: 6px;
    border: 1px solid var(--brand-blue);
}

#keki-app .board-edge.duplungolva {
    border-width: 3px;
    box-shadow: inset 0 0 0 1px var(--brand-blue);
}

#keki-app .board-edge.duplungolva-feher {
    border-width: 3px;
    background: linear-gradient(to bottom, white 0%, white 45%, #f0f0f0 50%, white 55%, white 100%);
    box-shadow: inset 0 0 0 1px var(--brand-blue);
}

#keki-app .board-edge.top { top: -18px; left: 50%; transform: translateX(-50%); }
#keki-app .board-edge.bottom { bottom: -18px; left: 50%; transform: translateX(-50%); }
#keki-app .board-edge.left { left: -18px; top: 50%; transform: translateY(-50%) rotate(-90deg); }
#keki-app .board-edge.right { right: -18px; top: 50%; transform: translateY(-50%) rotate(90deg); }

#keki-app .modal-details {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 20px 0;
    line-height: 1.7;
}

#keki-app .modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

#keki-app .modal-button {
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-full);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 48px;
}

#keki-app .modal-button.primary { background: var(--brand-blue); color: white; }
#keki-app .modal-button.secondary { background: var(--bg-main); color: var(--text-primary); }
#keki-app .modal-button:hover { transform: translateY(-1px); }

/* ========== Toast ========== */
#keki-app .toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    pointer-events: none;
}

#keki-app .toast {
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 600;
    color: white;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
    pointer-events: auto;
    white-space: nowrap;
}

#keki-app .toast.success { background: var(--green); }
#keki-app .toast.error { background: var(--red); }
#keki-app .toast.info { background: var(--brand-blue); }

/* ========== Floating Bottom Bar ========== */
#keki-app .floating-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-light);
    z-index: 1500;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transition: transform 0.3s ease;
}

#keki-app .floating-bar.hidden { transform: translateY(100%); }

#keki-app .floating-bar-count {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

#keki-app .floating-bar-count span {
    color: var(--brand-blue);
    font-size: 20px;
}

#keki-app .floating-bar-btn {
    background: var(--brand-blue);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
}

#keki-app .floating-bar-btn:hover { background: var(--brand-blue-light); }

/* ========== Excel Link ========== */
#keki-app .excel-link-section {
    text-align: center;
    padding: 20px 16px 40px;
}

#keki-app .excel-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

#keki-app .excel-link:hover {
    color: var(--brand-blue);
    border-color: var(--brand-blue);
    background: rgba(48, 101, 144, 0.04);
}

/* ========== Tooltip ========== */
#keki-app .tooltip { position: relative; display: inline-block; cursor: help; }

#keki-app .tooltip-text {
    visibility: hidden;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.88);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 1000;
}

#keki-app .tooltip:hover .tooltip-text { visibility: visible; opacity: 1; }

/* ========== Animations ========== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(3deg); }
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.9) translateY(30px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}

#keki-app .fade-in-section { opacity: 0; animation: fadeInUp 0.6s ease-out forwards; }
#keki-app .new-row, #keki-app .new-card { animation: fadeInUp 0.4s ease-out; background: rgba(48, 101, 144, 0.03); }

/* ========== Responsive - Tablet ========== */
@media (max-width: 1024px) {
    #keki-app .material-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ========== Responsive - Mobile ========== */
@media (max-width: 768px) {
    #keki-app .two-col-container {
        grid-template-columns: 1fr;
    }

    #keki-app .col-right {
        position: static;
    }

    #keki-app .hero-content { padding: 30px 20px 20px; }
    #keki-app .hero-title { letter-spacing: -1px; }
    #keki-app .hero-subtitle { font-size: 16px; margin-bottom: 20px; }

    #keki-app .steps-guide { gap: 8px; }
    #keki-app .step-item { font-size: 13px; }
    #keki-app .step-number { width: 26px; height: 26px; font-size: 12px; }

    #keki-app .form-card { padding: 24px 18px; }
    #keki-app .section-title { font-size: 20px; }

    #keki-app .form-grid { grid-template-columns: 1fr; gap: 16px; }

    #keki-app .edges-grid { grid-template-columns: 1fr; gap: 14px; }

    #keki-app .extra-options-grid { grid-template-columns: 1fr; gap: 10px; }

    #keki-app .table-container table { display: none; }
    #keki-app .mobile-table { display: flex; }

    #keki-app .modal-content { padding: 28px 20px; width: 95%; }
    #keki-app .board-preview { width: 220px; height: 110px; }

    #keki-app .material-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    #keki-app .material-picker-content { padding: 20px 14px; }
    #keki-app .material-picker-title { font-size: 20px; }
    #keki-app .material-code { font-size: 9px; padding: 6px; }

    #keki-app .floating-bar { padding: 10px 16px; }
}

@media (max-width: 480px) {
    #keki-app .material-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    #keki-app .material-code { font-size: 8px; padding: 5px; }
    #keki-app .edge-buttons { gap: 4px; }
    #keki-app .edge-btn { padding: 8px 4px; font-size: 12px; min-width: 48px; }
}

@media (min-width: 769px) {
    #keki-app .mobile-table { display: none !important; }
}

/* ========== Request type radio buttons ========== */
#keki-app .request-type-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

#keki-app .request-type-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
    font-weight: 500;
}

#keki-app .request-type-option:hover { border-color: var(--brand-blue); }

#keki-app .request-type-option:has(input:checked) {
    border-color: var(--brand-blue);
    background: rgba(48, 101, 144, 0.04);
}

#keki-app .request-type-option input[type="radio"] {
    accent-color: var(--brand-blue);
    width: 18px;
    height: 18px;
}

/* ========== Form Button (submit) ========== */
#keki-app .form-button {
    background: var(--brand-blue);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: var(--radius-full);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 24px auto;
    min-width: 220px;
    box-shadow: 0 6px 20px rgba(48, 101, 144, 0.25);
}

#keki-app .form-button:hover {
    background: var(--brand-blue-light);
    transform: translateY(-2px);
}
