/* METRISI APP - STREAMLINED STYLES */

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --success: #48bb78;
    --danger: #f56565;
    --warning: #ed8936;
    --bg: #f7fafc;
    --card-bg: #ffffff;
    --text: #2d3748;
    --text-secondary: #718096;
    --border: #e2e8f0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* HEADER */
.app-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.company-info h1 {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 0.2rem;
}

.company-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* CONTAINER */
.container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* CARDS */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 1rem 1.5rem;
}

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* COMPACT FORMS - Desktop App Style */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.form-col {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-col-full {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-col label,
.form-col-full label {
    font-weight: 600;
    min-width: 85px;
    font-size: 0.9rem;
    color: var(--text);
}

.form-col input,
.form-col-full input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
}

.form-col input:focus,
.form-col-full input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* BUTTONS */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: var(--warning);
    color: white;
}

.btn-large {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

/* INFO MESSAGE */
.info-message {
    background: #ebf8ff;
    border-left: 4px solid #4299e1;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    color: #2c5282;
}

/* MEASUREMENT PAGE */
.measurement-page {
    background: var(--bg);
}

/* TOP BAR */
.top-bar-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 0.75rem 1rem;
}

.top-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.btn-back {
    padding: 0.5rem 1rem;
    background: var(--text-secondary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.customer-summary {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 200px;
}

.order-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.value-input {
    width: 100px;
    padding: 0.4rem;
    border: 2px solid var(--border);
    border-radius: 4px;
    text-align: right;
    font-weight: 700;
}

/* DIAGRAM CONTAINER - ABSOLUTE POSITIONING */
.diagram-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 2rem 0;
}

.diagram-image {
    width: 100%;
    height: auto;
    display: block;
}

.input-overlay {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.input-overlay label {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.input-overlay input {
    width: 70px;
    padding: 0.3rem 0.5rem;
    border: 2px solid var(--border);
    border-radius: 4px;
    text-align: center;
    font-size: 0.9rem;
}

.input-overlay input:focus {
    outline: none;
    border-color: var(--primary);
}

/* BALCONY ITEM */
.balcony-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-top: 70px;
}

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

.balcony-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

/* CAROUSEL */
.carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
}

.carousel-nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.carousel-nav-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.carousel-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ACTION BUTTONS */
.action-buttons-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
    display: flex;
    gap: 1rem;
    z-index: 900;
}

.action-buttons-fixed .btn {
    flex: 1;
}

/* FLOATING BUTTON */
.btn-balcony-menu {
    position: fixed;
    right: 1.5rem;
    bottom: 100px;
    padding: 1rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    font-weight: 600;
    cursor: pointer;
    z-index: 900;
}

.btn-balcony-menu:hover {
    transform: scale(1.05);
}

/* MODALS */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

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

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-body {
    padding: 1.5rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-col,
    .form-col-full {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-col label,
    .form-col-full label {
        min-width: auto;
    }
    
    .top-bar-content {
        flex-direction: column;
        align-items: stretch;
    }
}

/* HIDDEN */
.hidden {
    display: none !important;
}
