/* --- CATEGORIES DRAWER & IMPROVED HEADER --- */
.header-main-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 5px;
}

.header-actions-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-left-group {
    display: flex;
    align-items: center;
}

.app-brand {
    font-size: 1.3rem;
    font-weight: 850 !important;
    text-align: left;
    margin: 0;
    letter-spacing: -0.5px;
}

.header-btn {
    background: rgba(243, 244, 246, 0.8);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    padding: 0;
}

.header-btn i,
.header-btn [data-lucide] {
    display: block;
}

.header-btn:active {
    transform: scale(0.9);
}

.app-shell.theme-dark .header-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
}

.app-drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 40px;
    overflow: hidden;
    pointer-events: none;
}

.app-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.app-drawer {
    position: absolute;
    top: 0;
    left: -90%;
    width: 85%;
    height: 100%;
    background: #ffffff;
    z-index: 2001;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .app-drawer,
.theme-dark .app-drawer {
    background: #111827;
    color: #f9fafb;
}

.app-drawer.active {
    left: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1.5px solid #f1f5f9;
}

.theme-dark .drawer-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.drawer-header h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, var(--app-primary), #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.close-drawer {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
}

.theme-dark .close-drawer {
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.drawer-content::-webkit-scrollbar {
    width: 4px;
}

.drawer-content::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.drawer-category-group {
    margin-bottom: 12px;
}

.drawer-cat-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.drawer-cat-main:hover {
    background: #f1f5f9;
}

.theme-dark .drawer-cat-main {
    background: rgba(255, 255, 255, 0.05);
}

.drawer-cat-main span {
    flex: 1;
}

.drawer-subcats {
    padding-left: 15px;
    margin: 4px 0 12px 10px;
    border-left: 1.5px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.theme-dark .drawer-subcats {
    border-left-color: rgba(255, 255, 255, 0.1);
}

.drawer-subcat-item {
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #64748b;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.theme-dark .drawer-subcat-item {
    color: #94a3b8;
}

.drawer-subcat-item:hover {
    background: rgba(99, 102, 241, 0.05);
    color: var(--app-primary);
    padding-left: 18px;
}

.drawer-empty {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

/* --- SHARE DRAWER (BOTTOM SHEET) --- */
.app-share-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 40px;
    overflow: hidden;
    pointer-events: none;
}

.app-share-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.app-share-drawer {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    z-index: 2101;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 25px 20px;
    border-radius: 25px 25px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
}

.theme-dark .app-share-drawer {
    background: #111827;
}

.app-share-drawer.active {
    bottom: 0;
}

.share-drag-handle {
    width: 40px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 4px;
    margin: -10px auto 15px;
    opacity: 0.5;
}

.share-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.share-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
}

.close-share {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
}

.share-options-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #4b5563;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.theme-dark .share-option {
    color: #94a3b8;
}

.share-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.2s;
}

.share-option:active .share-icon-circle {
    transform: scale(0.9);
}

.share-icon-circle.whatsapp {
    background: #25D366;
}

.share-icon-circle.email {
    background: #6366f1;
}

.share-icon-circle.copy {
    background: #64748b;
}

.share-icon-circle.twitter {
    background: #000000;
}