:root {
    --bg-color: #f8faff;
    --primary: #8b5cf6;
    --primary-grad: linear-gradient(135deg, #a78bfa 0%, #d946ef 100%);
    --soft-pink-grad: linear-gradient(135deg, #f472b6 0%, #a78bfa 100%);
    --text-dark: #334155;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --input-border: #cbd5e1;
    --shadow: 0 4px 20px rgba(139, 92, 246, 0.1);
}

/* --- BODY & BACKGROUND --- */
body {
    margin: 0; padding: 0;
    font-family: 'Padauk', 'Poppins', sans-serif;
    
    /* နောက်ခံအရောင် အဓိကထားသည့်နေရာ */
    background-color: #fdfbff; 
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(255, 228, 240, 0.8) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(220, 252, 231, 0.8) 0%, transparent 50%);
        
    background-attachment: fixed;
    background-size: cover;
    min-height: 100vh;
    color: var(--text-dark);
    -webkit-tap-highlight-color: transparent;
}

.main-bg { display: none; }

/* --- HEADER SECTION --- */
.app-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 30px;
    
    /* Header ကိုလည်း ဖန်သားပြင်ပုံစံလုပ်မယ် */
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.5);
    
    position: sticky; top: 0; z-index: 1000;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-text { font-size: 1.5rem; color: #333; font-weight: bold; margin: 0; }
.highlight { color: #d63384; }

.profile-wrapper { position: relative; display: flex; align-items: center; }

.profile-badge {
    width: 45px; height: 45px;
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: white; font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15); transition: transform 0.2s; border: 2px solid #fff;
}
.profile-badge:hover { transform: scale(1.05); }

/* --- DROPDOWN MENU --- */
.fancy-dropdown {
    display: none; position: absolute; top: 60px; right: 0; width: 260px;
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px);
    border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); border: 1px solid #fff;
    overflow: hidden; z-index: 2000; animation: slideDown 0.3s ease;
}
.fancy-dropdown.show { display: block; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.dropdown-header { background: #f8f9fa; padding: 15px; border-bottom: 1px solid #eee; }
.dropdown-header span { display: block; color: #888; font-size: 0.8rem; }
.user-email-text { color: #333 !important; font-weight: bold; font-size: 0.95rem !important; margin-top: 5px; word-break: break-all; }

.logout-item { padding: 15px; color: #ff4757; cursor: pointer; display: flex; align-items: center; gap: 10px; font-weight: 600; transition: background 0.2s; }
.logout-item:hover { background: #fff0f1; }

/* --- MAIN CONTENT & CARDS (GLASS STYLE) --- */
.container { padding: 15px 15px 100px 15px; position: relative; z-index: 1; }

/* (1) Search Box - Glass Effect */
.search-box {
    /* အဖြူရောင် ၇၀% ထားလိုက်တော့ နောက်ခံအရောင် စိမ့်ဝင်လာမယ် */
    background: rgba(255, 255, 255, 0.7); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    padding: 12px 15px; border-radius: 15px;
    display: flex; align-items: center; gap: 10px; margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    border: 1px solid rgba(255, 255, 255, 0.6); /* အဖြူရောင် ဘောင်ပါးပါး */
}
.search-box input { background: transparent; border: none; outline: none; width: 100%; font-family: inherit; font-size: 1rem; }
.search-box i { color: #94a3b8; }

/* (2) Filter Buttons - Glass Effect */
.filter-row { display: flex; gap: 10px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 5px; }
.filter-btn {
    padding: 8px 16px; border-radius: 20px; 
    
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    
    color: #64748b; font-size: 0.9rem; font-family: inherit;
    cursor: pointer; transition: 0.3s; white-space: nowrap;
}
.filter-btn.active {
    background: var(--primary-grad); color: #fff; border-color: transparent;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3); font-weight: bold;
}

/* (3) Note Cards - Glass Effect */
.notes-grid { display: flex; flex-direction: column; gap: 15px; }
.note-card {
    /* အဖြူရောင်သန့်သန့်မဟုတ်ဘဲ ဖန်သားပြင်ပုံစံ */
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    border-radius: 20px; padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05); 
    border: 1px solid rgba(255, 255, 255, 0.8);
    
    transition: all 0.3s; position: relative; overflow: hidden;
}
.note-card:hover { 
    transform: translateY(-3px); 
    background: rgba(255, 255, 255, 0.9); /* Mouse တင်ရင် ပိုလင်းသွားမယ် */
    border-color: #e9d5ff; 
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.15);
}

.category-badge {
    position: absolute; top: 20px; right: 20px;
    font-size: 0.7rem; padding: 4px 10px; border-radius: 8px; font-weight: bold;
}
.cat-personal { background: rgba(224, 242, 254, 0.8); color: #0284c7; }
.cat-work { background: rgba(243, 232, 255, 0.8); color: #7c3aed; }

.card-icon {
    width: 40px; height: 40px; background: rgba(243, 232, 255, 0.8); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #8b5cf6; margin-bottom: 10px; font-size: 1.2rem;
}
.card-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 5px; }
.card-desc { font-size: 0.9rem; color: #64748b; }

/* --- AUTHENTICATION (SOLID COVER) --- */
/* Login ဝင်တဲ့နေရာမှာ နောက်ခံ UI ကို လုံးဝမမြင်ရအောင် ပြင်ဆင်ထားသည် */
.auth-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    
    /* နောက်ခံအရောင်အပြည့် (Solid Gradient) ထည့်လိုက်သည် */
    background-color: #f8faff;
    background-image: 
        radial-gradient(circle at 10% 20%, rgb(255, 228, 240) 0%, transparent 60%),
        radial-gradient(circle at 90% 90%, rgb(220, 252, 231) 0%, transparent 60%);
    
    z-index: 9999; /* အမြင့်ဆုံးမှာထားမယ် */
    display: flex; justify-content: center; align-items: center;
}

.auth-card {
    background: rgba(255, 255, 255, 0.85); /* ကတ်ပြားကို ပိုထင်းအောင်ထားမယ် */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid #fff;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    
    width: 90%; max-width: 400px;
    padding: 40px 30px; border-radius: 24px;
    text-align: center;
    animation: popUp 0.5s ease;
}

.auth-header { text-align: center; margin-bottom: 25px; }
.auth-header h2 { margin: 0 0 5px 0; color: #334155; }
.auth-header p { margin: 0; color: #64748b; font-size: 0.9rem; }

.forgot-link {
    text-align: right; font-size: 0.85rem; color: #f472b6;
    margin-bottom: 20px; cursor: pointer; font-weight: 600;
}
.forgot-link:hover { text-decoration: underline; color: #d946ef; }

.auth-footer { text-align: center; margin-top: 20px; font-size: 0.9rem; color: #64748b; }
.auth-footer span { color: #f472b6; font-weight: 700; cursor: pointer; margin-left: 5px; }

/* Input Styles */
.input-group { margin-bottom: 20px; text-align: left; }
.input-group label { display: block; font-size: 0.85rem; font-weight: 600; color: #64748b; margin-bottom: 8px; }

.lion-input {
    width: 100%; padding: 14px 15px; 
    background: #f8fafc; 
    border: 1px solid var(--input-border); border-radius: 12px;
    font-size: 1rem; color: #334155; font-family: inherit; box-sizing: border-box;
    transition: 0.3s;
}
.lion-input:focus { 
    background: #fff; border-color: #f472b6; outline: none; 
    box-shadow: 0 0 0 4px rgba(244, 114, 182, 0.1); 
}
.textarea { height: 80px; resize: none; }
.tall { height: 150px; resize: none; }

/* Buttons */
.modal-footer {
    padding: 20px 25px; border-top: 1px solid var(--border);
    display: flex; gap: 10px; background: #fff; border-radius: 0 0 24px 24px;
}
.btn-save { 
    flex: 2; padding: 14px; background: var(--soft-pink-grad); 
    color: #fff; border: none; border-radius: 12px; font-weight: 600; font-family: inherit; 
    box-shadow: 0 4px 15px rgba(244, 114, 182, 0.3); transition: 0.3s;
}
.btn-save:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(244, 114, 182, 0.4); }
.btn-cancel { flex: 1; padding: 14px; background: #f1f5f9; color: #64748b; border: none; border-radius: 12px; font-weight: 600; font-family: inherit; }
.btn-edit { flex: 1; background: #fdf2f8; color: #db2777; border: none; padding: 14px; border-radius: 12px; font-weight: 600; font-family: inherit; }
.btn-delete { flex: 1; background: #fef2f2; color: #ef4444; border: none; padding: 14px; border-radius: 12px; font-weight: 600; font-family: inherit; }

/* MODALS */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(5px);
    z-index: 1100; justify-content: center; align-items: center;
}
.modal-overlay.active { display: flex; }

.modal-card {
    background: #fff; width: 90%; max-width: 500px;
    border-radius: 24px; display: flex; flex-direction: column;
    max-height: 85vh; animation: popUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes popUp { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.modal-header {
    padding: 20px 25px; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.modal-header h3 { margin: 0; font-size: 1.1rem; color: #334155; }
.close-btn {
    background: #f1f5f9; border: none; width: 32px; height: 32px; border-radius: 50%;
    color: #64748b; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.scrollable-content { padding: 25px; overflow-y: auto; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* Switches & Rows */
.type-switch, .cat-switch { display: flex; gap: 10px; background: #f1f5f9; padding: 5px; border-radius: 12px; }
.type-option, .cat-option { flex: 1; position: relative; cursor: pointer; }
.type-option input, .cat-option input { display: none; }
.type-box, .cat-box {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px; border-radius: 10px; font-size: 0.9rem; 
    color: #64748b; transition: 0.2s; border: 1px solid transparent;
}
.type-option input:checked + .type-box, .cat-option input:checked + .cat-box {
    background: #fff; color: #7c3aed; font-weight: 700; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); border-color: #e2e8f0;
}

.row-header-action { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.btn-add-slot { background: none; border: none; color: #8b5cf6; font-weight: 600; cursor: pointer; font-family: inherit;}
.acc-row-card {
    background: #fff; border: 1px solid #cbd5e1;
    padding: 15px; border-radius: 15px; margin-bottom: 15px; position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.acc-row-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 15px; border-bottom: 1px dashed #e2e8f0; padding-bottom: 10px;
}
.slot-label { font-size: 0.8rem; font-weight: 700; color: #94a3b8; text-transform: uppercase; }
.btn-remove-row { color: #ef4444; background: #fee2e2; border: none; padding: 5px 10px; border-radius: 8px; cursor: pointer; font-size: 0.8rem; }
.acc-input-box { position: relative; margin-bottom: 12px; }
.acc-input-box:last-child { margin-bottom: 0; }
.acc-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 1rem; }
.acc-input-styled {
    width: 100%; padding: 12px 12px 12px 40px; background: #f8fafc; border: 1px solid #cbd5e1; 
    border-radius: 10px; font-size: 0.95rem; font-family: inherit; color: #334155; box-sizing: border-box;
}
.acc-input-styled:focus { border-color: #8b5cf6; background: #fff; outline: none; box-shadow: 0 0 0 3px #f3e8ff; }

/* View & FAB */
.view-item { margin-bottom: 25px; }
.view-label { font-size: 0.8rem; color: #94a3b8; margin-bottom: 8px; font-weight: 600; }
.view-val-box {
    background: #f8fafc; border: 1px solid #e2e8f0; padding: 12px 15px;
    border-radius: 12px; font-size: 1rem; color: #334155;
    display: flex; justify-content: space-between; align-items: center;
    white-space: pre-wrap; word-wrap: break-word; word-break: break-all; overflow-wrap: anywhere;
}
.copy-icon { color: #8b5cf6; cursor: pointer; padding: 5px; flex-shrink: 0; margin-left: 10px; }
.view-header-wrapper {
    position: relative; display: flex; justify-content: center; align-items: center;
    margin-bottom: 20px; padding-bottom: 15px; border-bottom: 2px dashed #cbd5e1; min-height: 40px;
}
.view-title-large {
    font-size: 1.6rem; font-weight: 800; color: #1e293b;
    margin: 0; line-height: 1.4; text-align: center; width: 100%;
    padding: 0 80px; word-break: break-word;
}
.view-header-wrapper span { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }

.fab-btn {
    position: fixed; bottom: 30px; right: 25px;
    background: var(--primary-grad); color: #fff; border: none;
    padding: 15px 25px; border-radius: 50px; font-size: 1rem; font-weight: 600;
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4);
    display: flex; align-items: center; gap: 10px; font-family: inherit; z-index: 900;
}

/* Misc */
.confirm-card { max-width: 320px; text-align: center; padding: 30px 20px; }
.confirm-icon { font-size: 3rem; color: #ef4444; margin-bottom: 15px; animation: shake 0.5s ease-in-out; }
.confirm-card h3 { margin: 0 0 10px 0; color: #334155; }
.confirm-card p { color: #64748b; margin-bottom: 25px; line-height: 1.5; }
.confirm-actions { display: flex; gap: 15px; justify-content: center; }
@keyframes shake { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-10deg); } 75% { transform: rotate(10deg); } }

@keyframes slideInHighlight {
    0% { opacity: 0; transform: translateY(-20px) scale(0.95); border-color: #8b5cf6; background-color: #f3e8ff; }
    50% { transform: translateY(0) scale(1.02); }
    100% { opacity: 1; transform: scale(1); border-color: #cbd5e1; background-color: #fff; }
}
.acc-row-card.new-slot { animation: slideInHighlight 0.6s ease-out forwards; border: 2px solid #8b5cf6; }

.password-wrapper { position: relative; width: 100%; }
.password-wrapper input { padding-right: 40px; }
.toggle-btn {
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
    color: #94a3b8; cursor: pointer; font-size: 1rem; z-index: 10;
}
.toggle-btn:hover { color: #8b5cf6; }

.msg-box {
    padding: 12px; margin-bottom: 15px; border-radius: 10px;
    font-size: 0.9rem; text-align: center; display: none; animation: fadeIn 0.3s ease-in-out;
}
.msg-error { background-color: #fef2f2; color: #ef4444; border: 1px solid #fca5a5; display: block; }
.msg-success { background-color: #f0fdf4; color: #16a34a; border: 1px solid #86efac; display: block; }
.btn-loading { opacity: 0.7; cursor: not-allowed; pointer-events: none; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

.card-date {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}
/* --- Modal Layers (z-index) ကို သီးသန့်စီမံခြင်း --- */

/* Note ရေးတဲ့ Box နဲ့ Note အသေးစိတ်ကြည့်တဲ့ Box */
#noteModal, #viewModal {
    z-index: 1100 !important; 
}

/* Confirm Box (သေချာပါသလား) ကို အမြဲတမ်း အပေါ်ဆုံးမှာ ထားမည် */
#confirmModal {
    z-index: 3000 !important; 
}