@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
:root {
    --bg-color: #f8f9fa; --text-color: #111; --card-bg: #fff; --border-color: #ddd;
    --header-bg: #4A90E2; --weekend-bg: #fff6f6; --weekend-text: #d20000;
    --resmi-bg: #ffe6e6; --dini-bg: #e9f7ff; --bayram-bg: #dff6e5; --tatil-bg: #fff7da;
    --highlight-outline: #4A90E2; --note-indicator-color: #4A90E2; --today-outline: #ff0000;
}
body.dark-mode {
    --bg-color: #121212; --text-color: #e0e0e0; --card-bg: #1e1e1e; --border-color: #444;
    --header-bg: #3a7bc8; --weekend-bg: #3c1e1e; --weekend-text: #ff8a8a;
    --resmi-bg: #4d2626; --dini-bg: #1e3a4c; --bayram-bg: #1e4228; --tatil-bg: #4d4323;
    --highlight-outline: #58a6ff; --note-indicator-color: #58a6ff; --today-outline: #ff8a8a;
}
@page { size: A4; margin: 10mm; }
* { box-sizing: border-box; }
html, body { 
    font-family: 'Inter', Arial, Helvetica, sans-serif; 
    color: var(--text-color); 
    margin: 0; padding: 10px;
    background-color: var(--bg-color);
}

.main-wrapper { max-width: 800px; margin: 0 auto; }

/* Paneller */
.day-counter-panel, .countdown-timer, .current-day-status-panel { 
    text-align: center; padding: 12px; margin: 0 0 15px 0; background-color: var(--card-bg); 
    border: 1px solid var(--border-color); border-radius: 12px; 
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.day-counter-panel h3 { margin: 0 0 8px; font-size: 14px; color: var(--highlight-outline); }
.day-counter-panel .counters { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 10px; font-size: 12px; }
.day-counter-panel .counter-item span { font-weight: 700; font-size: 16px; }

.countdown-timer { background: var(--highlight-outline); color: white; display: flex; flex-direction: column; gap: 8px; align-items: center;}
.countdown-timer-header { display: flex; align-items: center; gap: 10px; }
.countdown-timer h4 { margin: 0; font-size: 12px; opacity: 0.9; }
#countdown-select { background-color: rgba(255,255,255,0.1); color: white; border: 1px solid rgba(255,255,255,0.3); border-radius: 5px; padding: 2px 5px; font-size: 11px; }
#countdown-select option { color: black; background-color: white; }
#countdown { font-size: 20px; font-weight: 700; }

.current-day-status-panel #today-date { font-size: 16px; font-weight: 600; margin: 0 0 5px 0; }
.current-day-status-panel #today-date strong { margin-right: 8px; color: var(--text-color); }
.current-day-status-panel #today-status { font-size: 14px; font-weight: 700; color: var(--highlight-outline); padding: 4px 10px; border-radius: 8px; background-color: rgba(74, 144, 226, 0.1); display: inline-block; }
body.dark-mode .current-day-status-panel #today-status { background-color: rgba(88, 166, 255, 0.2); }

/* Takvim */
.calendar-container { background: var(--card-bg); border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); overflow: hidden; }
.calendar-header { background: var(--header-bg); color: white; padding: 20px; text-align: center; position: relative; }
.calendar-header h1 { margin: 0; font-size: 24px; font-weight: 600; }
.nav-button { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.2); border: none; color: white; padding: 10px 15px; border-radius: 8px; cursor: pointer; font-size: 18px; transition: all 0.3s ease; }
.nav-button:hover { background: rgba(255,255,255,0.3); transform: translateY(-50%) scale(1.05); }
.nav-button.prev { left: 20px; } .nav-button.next { right: 20px; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; border-top: 1px solid var(--border-color); border-left: 1px solid var(--border-color); }
.dow { font-size: 12px; color: #888; background: #fbfbfc; padding: 10px 0; font-weight: 600; min-height: 40px; }
.dow, .day { border-right: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; text-align: center; position: relative; }
.day { padding: 8px; font-size: 14px; line-height: 1.2; flex-direction: column; justify-content: flex-start; cursor: pointer; transition: all 0.2s ease; min-height: 80px; }
.day:hover { background: #f0f8ff; transform: scale(1.02); z-index: 10; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.num-wrapper { position: relative; }
.day .num { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.day .mini { font-size: 9px; line-height: 1.1; font-weight: 500; word-break: break-word; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.day.today .num-wrapper { border: 2px solid var(--today-outline); border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;}
.day.today .num { color: var(--today-outline); }
.day .note-indicator { position: absolute; bottom: 0px; left: 50%; transform: translateX(-50%); width: 5px; height: 5px; background-color: var(--note-indicator-color); border-radius: 50%; }
.haftasonu { background: var(--weekend-bg); } .haftasonu .num { color: var(--weekend-text); }
.resmi, .resmi_arife { background: var(--resmi-bg); } .dini { background: var(--dini-bg); }
.bayram, .bayram_arife { background: var(--bayram-bg); } .ara-tatil, .yariyil-tatil { background: var(--tatil-bg); }
.dim { opacity: 0.3; color: #999; background: #f9f9f9; }
.month-footer { padding: 15px; background: #f7f7f9; border-top: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.workdays { font-size: 14px; font-weight: 600; color: #333; }
.calendar-link { font-size: 12px; color: #4A90E2; text-decoration: none; padding: 5px 10px; border: 1px solid #4A90E2; border-radius: 5px; transition: all 0.3s ease; }
.calendar-link:hover { background: #4A90E2; color: white; }

/* Not Modalı */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); }
.modal-content { background-color: var(--card-bg); margin: 15% auto; padding: 20px; border: 1px solid var(--border-color); width: 80%; max-width: 400px; border-radius: 12px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; margin-bottom: 15px; }
.modal-header h3 { margin: 0; } .modal-header .close { font-size: 28px; font-weight: bold; cursor: pointer; }
.modal-body textarea { width: 100%; height: 100px; padding: 10px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-color); color: var(--text-color); }
.modal-footer { text-align: right; margin-top: 15px; display: flex; gap: 8px; justify-content: flex-end; }
.modal-footer button { padding: 8px 15px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.modal-footer .btn-save { background-color: #28a745; color: white; } .modal-footer .btn-delete { background-color: #dc3545; color: white; }