
:root {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --nav-bg: #111827;
}

[data-theme="light"] {
    --bg-main: #f1f5f9;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: rgba(0, 0, 0, 0.1);
    --nav-bg: #1e293b; 
}

body {
    background-color: var(--bg-main) !important;
    color: var(--text-main) !important;
    transition: background 0.3s ease;
}

.card, .modal-content, .note-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
}

.text-muted { color: var(--text-muted) !important; }

[data-theme="light"] .pwa-nav {
    background-color: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
}


textarea#noteInput {
    background: transparent !important;
    color: inherit !important;
    border: none !important;
}

[data-theme="light"] .navbar-brand {
    color: #1e293b !important;
}
:root {
    --primary-color: #4f46e5;
    --nav-height: 65px;
}

body {
    padding-bottom: 80px; 
    background-color: #f3f4f6;
}

@media (min-width: 992px) {
    body { padding-bottom: 20px; }
}

.pwa-nav {
    background-color: var(--bg-card) !important; 
    border-top: 1px solid var(--border-color) !important;
    height: 70px;
    display: flex;
    align-items: center;
    transition: background 0.3s ease, border 0.3s ease;
}

.pwa-nav .nav-item {
    color: var(--text-muted); 
    background: transparent;
    transition: all 0.2s ease;
}

.pwa-nav .nav-item i {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.pwa-nav .nav-item.active {
    color: #4f46e5 !important; 
}

[data-theme="light"] .pwa-nav {
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.app-section {
    animation: fadeIn 0.3s ease-in-out;
}

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

.dropzone {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
    background: #fff;
    cursor: pointer;
}

.dropzone.dragover {
    border-color: var(--primary-color);
    background: #eef2ff;
}

.note-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    border: 1px solid #e5e7eb;
}


.nav-item {
    outline: none !important;
    box-shadow: none !important;
}

.nav-item i {
    transition: transform 0.2s ease;
}

.nav-item.active i {
    transform: translateY(-3px);
    color: #4f46e5;
}

.nav-item.active span {
    font-weight: 600;
}

.cursor-pointer {
    cursor: pointer !important;
}


.dropspace-navbar-nav .nav-link {
    color: #a0a0a0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
}

.dropspace-navbar-nav .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.05);
}

.dropspace-navbar-nav .nav-link.active {
    color: #fff !important;
    background: #4f46e5 !important; 
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.bg-dark.border-secondary {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

.navbar-brand:hover i {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}


.manual-style {
    border-radius: 0.5rem !important; 
    transition: all 0.3s ease;
    border: 2px solid #4f46e5 !important; 
    
}

#passkeyField:not(.input-group > #passkeyField) {
    width: 100%;
}

#passkeyField {
    letter-spacing: 2px;
    font-size: 1.25rem;
    border: 2px solid #4f46e5 !important;
}



.refresh-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--bs-secondary);
    transition: all 0.2s ease;
}

.refresh-btn:hover {
    color: var(--bs-primary);
    transform: scale(1.1);
}

.refresh-btn i {
    font-size: 0.85rem;
}

.animate-spin {
    animation: spin 0.8s infinite linear;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}



.note-item .card {
    min-height: 120px; 
    max-height: 280px; 
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.note-item .card-body {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.note-preview-content {
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 8; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: pre-wrap;
    word-break: break-all;
    margin-bottom: 0;
}

#notesGrid {
  min-height: 150px;
}

.bg-card { background-color: #ffffff; }
.bg-danger-subtle { background-color: #fff5f5 !important; }
.bg-warning-subtle { background-color: #fffdf2 !important; }
.bg-info-subtle { background-color: #f0f7ff !important; }
.bg-success-subtle { background-color: #f2fff5 !important; }


.bg-card { background-color: #ffffff !important; }
.bg-light-blue { background-color: #e7f3ff !important; }
.bg-light-green { background-color: #e4f9e0 !important; }
.bg-light-yellow { background-color: #fff4d1 !important; }
.bg-light-pink { background-color: #ffe4e1 !important; }
.bg-light-purple { background-color: #f3e8ff !important; }

.note-item .card {
    border: 1px solid rgba(0,0,0,0.05) !important;
}

.note-item .card[class*="theme-"] {
    background-repeat: no-repeat !important;
    background-position: bottom center !important;
    background-size: 100% auto !important;
    transition: background-color 0.3s ease;
    border: 1px solid rgba(0,0,0,0.08) !important;
}

.note-item .card[class*="theme-"] .card-body {
    z-index: 1;
    position: relative;
    
    text-shadow: 0 0 10px rgba(255,255,255,0.5); 
}

.theme-default { background-color: #ffffff !important; background-image: none !important; }
.theme-red     { background-color: #f28b82 !important; background-image: none !important; }
.theme-orange  { background-color: #e4ab60 !important; background-image: none !important; }
.theme-yellow  { background-color: #fff475 !important; background-image: none !important; }
.theme-green   { background-color: #ccff90 !important; background-image: none !important; }
.theme-teal    { background-color: #a7ffeb !important; background-image: none !important; }
.theme-blue    { background-color: #cbf0f8 !important; background-image: none !important; }

.theme-grocery { 
    background-color: #e8eaed !important; 
    background-image: url('https://www.gstatic.com/keep/backgrounds/grocery_light_0609.svg') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: bottom right !important;
}
.theme-food { 
    background-color: #fff475 !important; 
    background-image: url('https://www.gstatic.com/keep/backgrounds/food_light_0609.svg') !important; 
}
.theme-music { 
    background-color: #f3e8ff !important; 
    background-image: url('https://www.gstatic.com/keep/backgrounds/music_light_0609.svg') !important; 
}
.theme-travel { 
    background-color: #e7f3ff !important; 
    background-image: url('https://www.gstatic.com/keep/backgrounds/travel_light_0609.svg') !important; 
}
.theme-celebration { 
    background-color: #e8eaed !important; 
    background-image: url('https://www.gstatic.com/keep/backgrounds/celebration_light_0609.svg') !important; 
}


.note-item .card[class*="theme-"], 
.swal2-popup[class*="theme-"] {
    background-repeat: no-repeat !important;
    background-position: bottom center !important;
    background-size: 100% auto !important;
    transition: background-color 0.3s ease;
}

.swal2-popup[class*="theme-"] #modalPreContent,
.swal2-popup[class*="theme-"] #modalEditArea {
    background: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(2px); 
    border: 1px solid rgba(0,0,0,0.05) !important;
}

.theme-content-area {
    background: rgba(255, 255, 255, 0.25) !important; 
    backdrop-filter: blur(4px); 
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    color: #202124 !important; 
}

.swal2-title {
    margin-top: 10px !important;
    background: transparent !important;
}

.custom-switch-lg .form-check-input {
    width: 3rem;
    height: 1.5rem;
    cursor: pointer;
}

#twoFactorPin {
    border-color: #e0e6ed;
    transition: all 0.2s ease;
}

#twoFactorPin:focus {
    border-color: var(--bs-primary);
    background-color: #fff;
    box-shadow: 0 0 0 0.25 row rgba(13, 110, 253, 0.1);
}

#editPinBtn {
    transition: all 0.2s ease;
    border-radius: 6px;
    font-weight: 600;
}

#editPinBtn:hover {
    background-color: rgba(13, 110, 253, 0.05);
    transform: translateY(-1px);
}

.custom-switch-lg .form-check-input {
    width: 3rem;
    height: 1.5rem;
    cursor: pointer;
}

#qrcode {
    background: white;
    padding: 20px; /* Ye wo extra white space hai */
    display: inline-block;
    border-radius: 12px; /* Thode curved corners */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* Halka sa shadow premium look ke liye */
}

#qrcode img {
    display: block;
    margin: 0 auto;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}