/* CSS for EZORARI - Refactored for Premium Look */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
    --primary-color: #2196F3;
    --primary-dark: #1976D2;
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --danger-color: #f44336;
    --info-color: #00BCD4;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-secondary: #666666;
    --border-color: #e0e0e0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

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

body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 
    font-size: 16px; 
    background: var(--bg-color); 
    color: var(--text-color);
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

.container { 
    max-width: 600px; 
    margin: 0 auto; 
    background: var(--card-bg); 
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

.header {
    background: var(--primary-color);
    color: white;
    padding: 24px 20px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.5px; }

.controls {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: var(--card-bg);
    position: sticky;
    top: 72px;
    z-index: 99;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    align-items: center;
}

select {
    flex: 1;
    padding: 10px 8px;
    font-size: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    color: var(--text-color);
    outline: none;
    transition: border-color 0.2s;
}

select:focus { border-color: var(--primary-color); }

button {
    padding: 10px 14px;
    font-size: 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

button:active { transform: scale(0.95); }

.btn-primary { background: var(--primary-color); color: white; }
.btn-summary { background: var(--success-color); color: white; }
.btn-backup { background: var(--warning-color); color: white; }
.btn-settings { background: #607D8B; color: white; }
.btn-print { background: #3F51B5; color: white; }
.btn-cloud { background: #673AB7; color: white; width: 100%; margin-bottom: 8px; font-size: 16px; padding: 12px; font-weight: 500; }
.btn-cloud-check { background: var(--info-color); color: white; }

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    padding: 8px;
    background: #eee;
}

.day-cell {
    background: white;
    padding: 15px 5px;
    text-align: center;
    cursor: pointer;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: background 0.2s;
    position: relative;
}

.day-cell:hover { background: #f0f7ff; }
.day-number { font-weight: 500; font-size: 16px; color: #444; }
.day-hours { font-size: 12px; color: var(--primary-color); font-weight: 600; margin-top: 2px; }
.day-notes-indicator { position: absolute; top: 4px; right: 4px; font-size: 10px; }

.saturday { background: #fffaf0; }
.sunday { background: #fff5f5; }
.has-entries { background: #e8f5e9 !important; }
.other-month { opacity: 0.3; pointer-events: none; }

/* MODALS */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
}

.modal-content {
    background: white;
    margin: 1.5rem auto;
    width: 92%;
    max-width: 450px;
    border-radius: 16px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalAppear 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 { font-size: 18px; font-weight: 600; }
.close { font-size: 24px; cursor: pointer; color: #bbb; }

.modal-body { padding: 24px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.form-group select, .form-group input, .form-group textarea {
    width: 100%; padding: 12px; font-size: 16px; border: 1px solid var(--border-color); border-radius: 10px; font-family: inherit; background: #fff;
}
.form-group textarea { min-height: 90px; }

.time-row { display: flex; gap: 12px; }
.time-row > div { flex: 1; }

.entry-list { margin-top: 20px; }
.entry-item-modal {
    display: flex; justify-content: space-between; align-items: center; padding: 14px;
    background: #f9fbfd; margin-bottom: 8px; border-radius: 12px; border: 1px solid #edf2f7;
}
.entry-info { display: flex; flex-direction: column; gap: 2px; }
.entry-time-range { font-size: 12px; color: #888; }
.entry-meta { font-size: 11px; color: #aab; font-style: italic; }

.btn-delete { background: #fee2e2; color: var(--danger-color); font-weight: 600; border-radius: 6px; padding: 6px 10px; font-size: 14px; }

.summary-card {
    background: #f1f8ff; padding: 24px; margin: 16px; border-radius: 16px; text-align: center;
    border: 1px solid #e1effe;
}
.summary-label { font-size: 14px; color: #5c6c7b; margin-bottom: 4px; }
.summary-value { font-size: 36px; font-weight: 700; color: var(--primary-color); line-height: 1; }
.summary-subtext { font-size: 14px; color: #5c6c7b; margin-top: 4px; }

#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 50px;
    padding: 16px;
    position: fixed;
    z-index: 2000;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
}
#toast.show { visibility: visible; opacity: 1; bottom: 60px; }

.db-status { position: fixed; bottom: 20px; left: 20px; background: rgba(76, 175, 80, 0.9); color: white; padding: 6px 12px; border-radius: 20px; font-size: 11px; font-weight: 500; }

.tabs { display: flex; background: #f0f2f5; border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.tab { flex: 1; padding: 10px; text-align: center; cursor: pointer; border-radius: 8px; font-size: 14px; font-weight: 500; transition: all 0.2s; }
.tab.active { background: white; box-shadow: 0 2px 4px rgba(0,0,0,0.05); color: var(--primary-color); }
.tab-content { display: none; }
.tab-content.active { display: block; }
