/* Kalender CSS based on image */
body {
    background-color: #fdfafb;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.k-header {
    background: #fdfafb;
    padding: 20px 15px;
}

.k-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.k-icon-drop {
    font-size: 24px;
    color: #e6a1b8; /* Light pink outline drop color */
    -webkit-text-stroke: 1px #e6a1b8;
    color: transparent; 
}

.k-title-text h2 {
    font-size: 22px;
    font-weight: bold;
    color: #333;
    margin: 0 0 4px 0;
}

.k-title-text p {
    font-size: 11px;
    color: #888;
    margin: 0;
}

.k-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.k-btn-today {
    background: #fff0f5;
    border: 1px solid #ffd6e8;
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 11px;
    color: #c24669;
    cursor: pointer;
    text-align: center;
}

.k-btn-today span {
    font-size: 10px;
    color: #777;
}

.k-nav-arrows {
    display: flex;
    gap: 20px;
}

.k-nav-arrows button {
    background: none;
    border: none;
    font-size: 16px;
    color: #555;
    cursor: pointer;
}

.k-month-label {
    text-align: right;
    font-size: 14px;
    color: #333;
}

.k-month-label strong {
    font-size: 16px;
}

.k-btn-sholat {
    width: 100%;
    background: transparent;
    border: 1px solid #f2c7d5;
    color: #c24669;
    padding: 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
    cursor: pointer;
}

.k-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11px;
    color: #555;
}

.k-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.k-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.k-haid { background: #ffcccc; }
.k-nifas { background: #d97090; }
.k-suci { background: #ccffcc; }
.k-melahirkan-outline { border: 2px solid #a366ff; background: transparent; width: 10px; height: 10px;}
.k-melahirkan-solid { background: #a366ff; }

.k-calendar-wrapper {
    background: white;
    border-radius: 16px;
    margin: 0 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    border: 1px solid #eee;
    padding: 10px;
}

.k-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    color: #777;
    margin-bottom: 10px;
}

.k-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    row-gap: 5px;
}

.k-day-cell {
    position: relative;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    color: #333;
    border-radius: 50%;
    margin: 2px;
    cursor: pointer;
}

.k-hijri-date {
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 8px;
    color: #999;
}

.k-empty-cell {
    background: transparent;
}

.k-day-cell.k-today {
    background-color: #ffe6eb;
    color: #fb5c82;
    font-weight: bold;
    box-shadow: inset 0 0 0 2px #fb5c82;
}

.k-day-cell.k-today.k-bg-haid, 
.k-day-cell.k-today.k-bg-nifas, 
.k-day-cell.k-today.k-bg-suci {
    box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px #fb5c82;
}

.k-day-cell.k-has-dot-start::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 8px;
    width: 6px;
    height: 6px;
    background-color: #c24669;
    border-radius: 50%;
    z-index: 2;
}

.k-day-cell.k-has-dot-end::after {
    content: '';
    position: absolute;
    bottom: 6px;
    right: 8px;
    width: 6px;
    height: 6px;
    background-color: #c24669;
    border-radius: 50%;
    z-index: 2;
}

.k-day-cell.k-bg-haid.k-has-dot-start::before,
.k-day-cell.k-bg-nifas.k-has-dot-start::before,
.k-day-cell.k-bg-suci.k-has-dot-start::before,
.k-day-cell.k-bg-haid.k-has-dot-end::after,
.k-day-cell.k-bg-nifas.k-has-dot-end::after,
.k-day-cell.k-bg-suci.k-has-dot-end::after {
    background-color: white;
}


/* Status colors for dates */
.k-day-cell.nifas {
    background: #d97090;
    color: white;
}

.k-day-cell.nifas .k-hijri-date {
    color: rgba(255,255,255,0.7);
}

.k-notes-container {
    padding: 15px;
}

.k-card {
    background: white;
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.k-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.k-card-header h3 {
    font-size: 16px;
    color: #333;
    margin: 0;
    flex-grow: 1;
}

.k-note-box {
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
}

.k-note-box h4 {
    font-size: 12px;
    margin: 0 0 10px 0;
}

.k-box-blue {
    background: #f0f7ff;
    border: 1px solid #d0e3ff;
}
.k-box-blue h4 { color: #2d6bcf; }

.k-box-orange {
    background: #fff8f0;
    border: 1px solid #ffe6cc;
}
.k-box-orange h4 { color: #d68128; }

.k-box-green {
    background: #f0fff4;
    border: 1px solid #cce8d6;
}
.k-box-green h4 { color: #2e8f52; }

.k-btn-add {
    width: 100%;
    background: transparent;
    padding: 8px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
}

.k-text-blue {
    color: #2d6bcf;
    border: 1px dashed #2d6bcf;
}

.k-text-orange {
    color: #d68128;
    border: 1px dashed #d68128;
}

.k-text-green {
    color: #2e8f52;
    border: 1px dashed #2e8f52;
}

.k-item-list {
    margin-bottom: 10px;
}

.k-item {
    background: white;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    border: 1px solid #fcf2e8;
}

.k-item-info {
    flex-grow: 1;
}

.k-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.k-btn-read {
    background: #eef4ff;
    color: #1b59c4;
    border: none;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
}

.k-btn-done {
    background: #eafaf1;
    color: #168449;
    border: none;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
}

.k-item-time {
    font-size: 10px;
    color: #888;
    margin-bottom: 2px;
}

.k-item-title {
    font-size: 12px;
    color: #333;
}

.k-btn-delete {
    background: transparent;
    border: none;
    color: #e63946;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.k-btn-edit {
    background: transparent;
    border: none;
    color: #888;
    font-size: 14px;
    cursor: pointer;
}

.k-year-desc {
    font-size: 11px;
    color: #777;
    margin-bottom: 12px;
    line-height: 1.4;
}

.k-year-input-area {
    border: 1px dashed #ddd;
    border-radius: 8px;
    padding: 15px;
    font-size: 12px;
    min-height: 50px;
    cursor: text;
}

#year-note-textarea {
    width: 100%;
    border: 1px solid #c24669;
    border-radius: 8px;
    padding: 10px;
    font-size: 12px;
    font-family: inherit;
    resize: none;
}
#year-note-textarea:focus {
    outline: none;
}

/* Jadwal Sholat Panel Styles */
.k-sholat-panel {
    background: #fffafa;
    border: 1px solid #f2d7de;
    border-radius: 12px;
    margin-bottom: 15px;
    padding: 15px;
}

.k-sholat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f2d7de;
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: #555;
    font-size: 14px;
}

.k-sholat-title {
    display: flex;
    align-items: center;
    color: #333;
    font-weight: 500;
}

.k-sholat-title i.fa-clock {
    color: #c24669;
    margin-right: 8px;
}

.k-sholat-actions {
    color: #888;
}

.k-sholat-date {
    text-align: center;
    font-size: 12px;
    color: #777;
    margin-bottom: 15px;
}

.k-sholat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.k-sholat-item {
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 20px;
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #333;
}

.k-sholat-item.active {
    background: #fdeff2;
    border-color: #f2c7d5;
    color: #c24669;
}

.k-sholat-item-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.k-sholat-item-time {
    font-weight: bold;
}

/* Fiqh Dynamic Cell Styles */
.k-bg-haid {
    background-color: #ffcccc !important;
    color: #a00 !important;
}
.k-bg-nifas {
    background-color: #d8839b !important; /* merah tua / pink gelap */
    color: #500 !important;
    border: 1px solid #b30000;
}
.k-bg-suci {
    background-color: #d9f2d9 !important;
    color: #080 !important;
}

/* Purple dot for melahirkan */
.k-mark-melahirkan-start::before, .k-mark-melahirkan-end::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 8px;
    height: 8px;
    background-color: #9932cc;
    border-radius: 50%;
}

.k-sholat-footer {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #aaa;
}

.k-btn-sholat.active {
    background: #fff0f5;
    border-color: #ffd6e8;
    color: #c24669;
}

/* Add Note Form Styles */
.k-add-form {
    margin-top: 10px;
    animation: fadeIn 0.2s ease-in-out;
}

.k-add-form-input {
    width: 100%;
    min-height: 60px;
    border: 1px solid #e0c8c8;
    border-radius: 8px;
    padding: 10px;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    margin-bottom: 10px;
    box-sizing: border-box;
    background: #fff;
}

.k-add-form-input:focus {
    outline: none;
    border-color: #c24669;
}

.k-add-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.k-add-btn-cancel {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 6px 18px;
    font-size: 12px;
    color: #555;
    cursor: pointer;
}

.k-add-btn-save {
    background: #d96684;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 6px 18px;
    font-size: 12px;
    cursor: pointer;
}

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

/* Modal Event Styles */
.k-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.k-modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.2s ease-in-out;
}

.k-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.k-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.k-modal-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #888;
    cursor: pointer;
}

.k-modal-subtitle {
    color: #777;
    font-size: 13px;
    margin-bottom: 15px;
}

.k-event-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.k-event-option {
    display: block;
    cursor: pointer;
}

.k-event-option input[type="radio"] {
    display: none;
}

.k-event-option-box {
    display: block;
    padding: 12px 15px;
    border: 1px solid #e0c8c8;
    border-radius: 10px;
    font-size: 14px;
    color: #555;
    transition: all 0.2s;
}

.k-event-option input[type="radio"]:checked + .k-event-option-box {
    border-color: #d96684;
    background-color: #fceef2;
    color: #d96684;
    font-weight: 500;
}

.k-time-picker-box {
    background: #fffafa;
    border: 1px solid #f2d7de;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

.k-time-picker-box p {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #333;
}

.k-time-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.k-time-inputs select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    outline: none;
    color: #333;
}

.k-time-inputs select:focus {
    border-color: #d96684;
}

.k-modal-footer {
    display: flex;
    gap: 10px;
}

.k-modal-footer button {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.k-btn-outline {
    background: white;
    border: 1px solid #e0c8c8;
    color: #555;
}

.k-btn-solid {
    background: #d96684;
    border: 1px solid #d96684;
    color: white;
}

/*  
 Modal  
 Event  
 */

/* Fiqh Ringkasan Data Redesign */
.k-status-bar {
    background: #fff0f3;
    border: 1px solid #ffccd5;
    border-radius: 8px;
    padding: 12px 15px;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.k-status-indicator {
    font-weight: bold;
    color: #c24669;
    display: flex;
    align-items: center;
}
.k-status-date {
    font-size: 13px;
    color: #888;
}

.k-ringkasan-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-top: 15px;
    border: 1px solid #eee;
    overflow: hidden;
}
.k-ringkasan-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: white;
}
.k-ringkasan-title {
    font-weight: bold;
    color: #333;
}
.k-ringkasan-title span {
    font-weight: normal;
    color: #888;
    font-size: 13px;
    margin-left: 5px;
}
.k-ringkasan-body {
    padding: 15px;
    border-top: 1px solid #eee;
}

.k-ringkasan-block {
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}
.k-ringkasan-block-red {
    background: #fff0f3;
}
.k-ringkasan-block-green {
    background: #f0fdf4;
}
.k-ringkasan-block-gray {
    background: #f8f9fa;
}

.k-rb-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 14px;
}
.k-rb-title { color: #555; }
.k-rb-duration { color: #555; }
.k-rb-duration-red { color: #c24669; }
.k-rb-duration-green { color: #16a34a; }

.k-rb-dates {
    text-align: right;
    font-size: 13px;
    color: #888;
    line-height: 1.4;
}

.k-ringkasan-summary {
    display: flex;
    justify-content: space-around;
    border-top: 1px dashed #ddd;
    border-bottom: 1px dashed #ddd;
    padding: 15px 0;
    margin: 15px 0;
    text-align: center;
}
.k-summary-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}
.k-summary-val {
    font-weight: bold;
    font-size: 14px;
}
.k-text-red { color: #c24669; }
.k-text-green { color: #16a34a; }

.k-ringkasan-instruction {
    text-align: center;
    font-size: 12px;
    color: #888;
    margin-bottom: 15px;
    line-height: 1.5;
}

.k-btn-salin-ringkasan {
    width: 100%;
    padding: 12px;
    background: white;
    border: 1px solid #fb5c82;
    color: #fb5c82;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}
.k-btn-salin-ringkasan:active {
    background: #fff0f3;
}

.k-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}
.k-dot.k-haid { background-color: #d32f2f; }
.k-dot.k-nifas { background-color: #880e4f; }
.k-dot.k-suci { background-color: #388e3c; }
.k-dot.k-melahirkan-outline { border: 2px solid #9932cc; background-color: transparent; }