/* ============================================
   ToolBox Indonesia — Tool Component Styles
   Shared styles for all tool pages
   ============================================ */
/* ============================================
   10015.IO STYLE SIDEBAR LAYOUT
   ============================================ */
.tool-layout-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - 64px);
    margin-top: 64px;
    /* offset for fixed navbar */
    transition: grid-template-columns 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Desktop Sidebar States (Only active above 992px) */
@media (min-width: 993px) {
    .tool-layout-wrapper.sidebar-minimized {
        grid-template-columns: 72px 1fr;
    }

    .tool-layout-wrapper.sidebar-hidden {
        grid-template-columns: 0px 1fr;
    }

    .tool-sidebar.minimized {
        width: 72px;
    }

    .tool-layout-wrapper.sidebar-hidden .tool-sidebar {
        transform: translateX(-100%);
        pointer-events: none;
        border-right: none;
    }
}

/* Tool Layout Grid (Shared for settings & output layout) */
.tool-layout-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 992px) {
    .tool-layout-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
/* Sidebar Styling */
.tool-sidebar {
    background: var(--glass-bg);
    border-right: 1px solid var(--border-color);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    height: calc(100vh - 64px);
    position: sticky;
    top: 64px;
    display: flex;
    flex-direction: column;
    z-index: 99;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        background 0.3s ease;
    width: 280px;
    /* base width */
}

/* Sidebar Footer Toggle styling */
.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background: var(--glass-bg);
    transition: justify-content 0.3s ease;
}

.tool-sidebar.minimized .sidebar-footer {
    justify-content: center;
}

.sidebar-footer button {
    background: none;
    border: none;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-footer button:hover {
    background: var(--bg-card-hover);
    color: var(--accent-primary);
}

.sidebar-footer button svg {
    width: 18px;
    height: 18px;
}

/* Minimized Nav Links & Category Headers */
.tool-sidebar.minimized .sidebar-category-title {
    justify-content: center;
    padding: 0.5rem 0;
}

.tool-sidebar.minimized .sidebar-category-title span {
    display: none;
}

.tool-sidebar.minimized .sidebar-tools-list {
    align-items: center;
}

.tool-sidebar.minimized .sidebar-tool-item {
    width: 100%;
    display: flex;
    justify-content: center;
}

.tool-sidebar.minimized .sidebar-tool-item a {
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 10px;
}

.tool-sidebar.minimized .sidebar-tool-item a span {
    display: none;
    /* Hide tool name */
}

.tool-sidebar.minimized .sidebar-tool-item a .tool-icon {
    width: 20px;
    height: 20px;
    margin: 0;
}

.tool-sidebar.minimized .sidebar-tool-item.active {
    border-left: none;
    border-radius: 10px;
    background: transparent;
}

.tool-sidebar.minimized .sidebar-tool-item.active a {
    background: rgba(124, 92, 252, 0.15);
    border: 1px solid rgba(124, 92, 252, 0.4);
    color: var(--accent-secondary);
    padding-left: 0;
}

.sidebar-search-box {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.sidebar-search-box i {
    position: absolute;
    left: 1.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    width: 16px;
    height: 16px;
}

.sidebar-search-box input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.sidebar-search-box input:focus {
    border-color: var(--accent-primary);
    background: var(--bg-input-focus);
    box-shadow: 0 0 10px rgba(124, 92, 252, 0.15);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-category-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    animation: fadeIn 0.3s ease;
}

.sidebar-category-group.hidden {
    display: none !important;
}

.sidebar-category-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--cat-color, var(--text-secondary));
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    opacity: 0.85;
}

.sidebar-category-title .cat-icon {
    width: 14px;
    height: 14px;
}

.sidebar-tools-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0;
    margin: 0;
}

.sidebar-tool-item {
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-tool-item.hidden {
    display: none !important;
}

.sidebar-tool-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-tool-item a .tool-icon {
    width: 16px;
    height: 16px;
    color: var(--text-tertiary);
    transition: color 0.2s ease;
}

.sidebar-tool-item:hover {
    background: var(--bg-card-hover);
}

.sidebar-tool-item:hover a {
    color: var(--text-primary);
}

.sidebar-tool-item:hover a .tool-icon {
    color: var(--accent-primary);
}

.sidebar-tool-item.active {
    background: rgba(124, 92, 252, 0.1);
    border-left: 3px solid var(--accent-primary);
    border-radius: 0 8px 8px 0;
}

.sidebar-tool-item.active a {
    color: #9793ff;
    font-weight: 700;
    padding-left: calc(0.75rem - 3px);
}

.sidebar-tool-item.active a .tool-icon {
    color: var(--accent-secondary);
}

/* Main Content Area */
.sidebar-overlay {
    display: none;
}

.tool-main-content {
    flex: 1;
    overflow-x: hidden;
}

.tool-page-body {
    padding: 1rem 0 1rem;
}

.tool-page-body .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0.5rem;
}

/* Mobile Responsive Drawer Sidebar */
@media (max-width: 992px) {
    .tool-layout-wrapper {
        display: block;
    }

    .tool-main-content {}

    .tool-sidebar {
        position: fixed;
        top: 64px;
        left: 0;
        bottom: 0;
        width: 280px;
        height: calc(100vh - 64px);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        background: var(--bg-secondary);
        border-right: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
    }

    .tool-sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: block;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--modal-overlay-bg, rgba(0, 0, 0, 0.55));
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 1000;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.show {
        opacity: 1;
        pointer-events: auto;
    }

    body.sidebar-locked {
        overflow: hidden;
    }
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
    animation: fadeIn 0.4s ease;
}

.breadcrumb a {
    color: var(--text-secondary);
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--accent-primary);
}

.breadcrumb .sep {
    color: var(--text-tertiary);
}

/* Tool Header */
.tool-header {
    margin-bottom: 2rem;
    animation: fadeInUp 0.5s ease;
}

/* Tasbih Counter specific styles */
.tasbih-display {
    transition: transform 160ms cubic-bezier(.2, .9, .4, 1), box-shadow 200ms ease, background 200ms ease;
    will-change: transform, box-shadow;
}

.tasbih-display.pulse {
    transform: scale(1.06);
    box-shadow: 0 18px 40px rgba(99, 102, 241, 0.18);
}

.tasbih-display.ring::after {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.08);
    animation: ringOut 700ms ease-out;
    pointer-events: none;
}

@keyframes ringOut {
    from {
        opacity: 0.9;
        transform: translate(-50%, -50%) scale(0.95);
    }

    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.6);
    }
}

/* smaller for mobile */
@media (max-width:720px) {
    .tasbih-display.ring::after {
        width: 160px;
        height: 160px;
    }
}

/* Tasbih display sizing and button styles */
.tasbih-display {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.2rem;
    font-weight: 800;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
    position: relative;
}

.tasbih-btn-large {
    background: var(--gradient-accent);
    border-radius: 24px;
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.tasbih-btn-large:active {
    transform: scale(0.99);
}

.tasbih-action-row .btn {
    padding: 8px 12px;
    font-size: 0.95rem;
}

.tasbih-action-row .btn.btn-danger {
    background: transparent;
    border: 1px solid var(--accent-danger);
    color: var(--accent-danger);
}

/* Religious visual flavor */
.tool-output {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
}

.tool-output .panel-title {
    gap: 12px;
}

.tool-output .panel-title i {
    color: var(--accent-primary);
}

@media (max-width:720px) {
    .tasbih-display {
        width: 160px;
        height: 160px;
        font-size: 2.4rem;
    }
}


.tool-header-top {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    margin-bottom: 0.8rem;
}

.tool-header .tool-page-icon {
    width: 35px;
    height: 35px;
    min-width: 25px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.tool-header .tool-page-icon svg {
    width: 26px;
    height: 26px;
}

.tool-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.3rem;
}

.tool-header .tool-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ---- Glass Panel ---- */
.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    transition: background 0.3s ease;
    animation: fadeInUp 0.5s ease 0.1s both;
}

.glass-panel+.glass-panel {
    /*     margin-top: 1.5rem; */
    animation-delay: 0.2s;
}

.panel-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-title svg {
    width: 18px;
    height: 18px;
    color: var(--accent-primary);
}

/* ---- Form Elements ---- */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    background: var(--bg-input-focus);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.1);
}

.form-control::placeholder {
    color: var(--text-tertiary);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238888aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    padding-right: 2.5rem;
}

/* Input with icon */
.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .form-control {
    padding-left: 2.8rem;
}

.input-icon-wrapper .input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    pointer-events: none;
}

.input-icon-wrapper .input-icon svg {
    width: 16px;
    height: 16px;
}

/* Input with suffix/prefix */
.input-addon-wrapper {
    display: flex;
    align-items: stretch;
}

.input-addon {
    padding: 0.75rem 0.8rem;
    background: var(--bg-tertiary);
    border: 1.5px solid var(--border-color);
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.input-addon:first-child {
    border-radius: 10px 0 0 10px;
    border-right: none;
}

.input-addon:last-child {
    border-radius: 0 10px 10px 0;
    border-left: none;
}

.input-addon-wrapper .form-control {
    border-radius: 0;
}

.input-addon-wrapper .form-control:first-child {
    border-radius: 10px 0 0 10px;
}

.input-addon-wrapper .form-control:last-child {
    border-radius: 0 10px 10px 0;
}

/* Form Row (side by side) */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Radio/Toggle Group */
.toggle-group {
    display: flex;
    background: var(--bg-input);
    border-radius: 10px;
    padding: 4px;
    gap: 4px;
    border: 1px solid var(--border-color);
}

.toggle-group label {
    flex: 1;
    text-align: center;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
}

.toggle-group input {
    display: none;
}

.toggle-group input:checked+label,
.toggle-group label.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(124, 92, 252, 0.3);
}

/* ---- Result Panel ---- */
.result-panel {
    background: var(--gradient-card);
    border: 1px solid var(--border-accent);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    animation: scaleIn 0.4s ease;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.result-item {
    text-align: center;
    padding: 1rem;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.result-item .result-value {
    font-size: 1.6rem;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 0.2rem;
}

.result-item .result-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Single large result */
.result-big {
    text-align: center;
    padding: 1.5rem;
}

.result-big .result-value {
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.result-big .result-unit {
    font-size: 1rem;
    color: var(--text-tertiary);
}

.result-big .result-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
}

/* ---- Data Table ---- */
.data-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-top: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.data-table thead {
    background: var(--bg-tertiary);
}

.data-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr {
    transition: background 0.15s ease;
}

.data-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.data-table .text-right {
    text-align: right;
}

.data-table .text-center {
    text-align: center;
}

/* ---- BMI Gauge ---- */
.bmi-gauge {
    position: relative;
    height: 24px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    margin: 1.5rem 0 1rem;
}

.bmi-gauge-segment {
    height: 100%;
    position: relative;
}

.bmi-gauge-segment:first-child {
    border-radius: 12px 0 0 12px;
}

.bmi-gauge-segment:last-child {
    border-radius: 0 12px 12px 0;
}

.bmi-gauge-pointer {
    position: absolute;
    top: -8px;
    width: 4px;
    height: 40px;
    background: var(--text-primary);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

/* ---- Dynamic List (for Food Cost, Invoice items) ---- */
.dynamic-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dynamic-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    animation: fadeInUp 0.3s ease;
}

.dynamic-list-item .form-control {
    background: var(--bg-card);
}

.dynamic-list-item .item-number {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 8px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-tertiary);
}

.dynamic-list-item .remove-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-danger);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dynamic-list-item .remove-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.05);
}

.dynamic-list-item .remove-btn svg {
    width: 16px;
    height: 16px;
}

.add-item-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 12px;
    border: 2px dashed var(--border-color);
    color: var(--text-tertiary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    width: 100%;
}

.add-item-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(124, 92, 252, 0.05);
}

.add-item-btn svg {
    width: 18px;
    height: 18px;
}

/* ---- Invoice Specific ---- */
.invoice-preview {
    background: white;
    color: #1a1a2e;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    font-size: 0.85rem;
}

.invoice-preview h2 {
    color: #1a1a2e;
    font-size: 1.5rem;
}

.invoice-preview table {
    width: 100%;
    border-collapse: collapse;
}

.invoice-preview table th,
.invoice-preview table td {
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid #e8eaf4;
    text-align: left;
}

.invoice-preview table th {
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #6b7294;
}

/* ---- QR Code ---- */
.qr-output {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
}

.qr-output canvas,
.bulk-qr-canvas-container canvas {
    display: block !important;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.qr-output img,
.bulk-qr-canvas-container img {
    display: none !important;
}

/* ---- Info Box ---- */
.info-box {
    padding: 1rem 1.2rem;
    border-radius: 10px;
    font-size: 0.85rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-top: 1rem;
}

.info-box svg {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 1px;
}

.info-box.info {
    background: rgba(124, 92, 252, 0.08);
    border: 1px solid rgba(124, 92, 252, 0.2);
    color: var(--accent-primary);
}

.info-box.success {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--accent-success);
}

.info-box.warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--accent-warning);
}

.info-box.danger {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--accent-danger);
}

/* ---- Category Page ---- */
.category-page {
    padding: 6rem 0 4rem;
}

.category-page-header {
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.5s ease;
}

.category-page-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.category-page-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ---- Tab Group ---- */
.tab-group {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-input);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.tab-group button {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    cursor: pointer;
}

.tab-group button.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(124, 92, 252, 0.3);
}

.tab-group button:hover:not(.active) {
    color: var(--text-primary);
    background: var(--bg-card);
}

/* ---- Responsive tool layout ---- */
@media (max-width: 640px) {
    .glass-panel {
        padding: 1rem;
        border-radius: 14px;
    }

    .result-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dynamic-list-item {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .dynamic-list-item .form-control {
        min-width: 0;
    }

    .tool-header h1 {
        font-size: 1.3rem;
    }

    .invoice-preview {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Make container wider for spin wheel page */
.tool-page:has(.spin-wheel-grid) .container {
    max-width: 1240px;
}

/* Make container wider for spin wheel page */
.tool-page:has(.spin-wheel-grid) .container {
    max-width: 1240px;
}

/* ============================================
   SPIN WHEEL UNDIAN STYLES
   ============================================ */
.spin-wheel-grid {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    /* Left column narrower, Right column (wheel) wider */
    gap: 2.5rem;
    gap: 2rem;
    align-items: start;
    margin-bottom: 2rem;
}

/* Entries and Settings Panels */
.sw-left-panel {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    accent-color: var(--accent-primary);
}

.checkbox-label span {
    color: var(--text-primary);
}

/* Entry Tags */
.btn-clear-all {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-danger);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-clear-all:hover {
    opacity: 0.8;
}

.entries-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    max-height: 220px;
    overflow-y: auto;
    padding: 0.3rem;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
}

.entry-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
    animation: scaleIn 0.2s ease;
}

.entry-tag:hover {
    border-color: var(--accent-primary);
    background: var(--bg-card-hover);
}

.entry-tag button {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s;
}

.entry-tag button:hover {
    color: var(--accent-danger);
}

/* Button layout tweaks */
.btn-addon {
    border-radius: 0 10px 10px 0;
    background: var(--accent-primary);
    color: white !important;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
}

.btn-addon:hover {
    background: #6a4fe3;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Wheel Canvas Wrapper */
.wheel-main-container {
    position: relative;
    width: 100%;
    max-width: 580px;
    /* Expanded size for prominence */
    display: flex;
    justify-content: center;
    align-items: center;
}

.wheel-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    /* Keep 1:1 Aspect Ratio */
    height: 0;
}

#wheel-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
}

/* Needle indicator pointing at 12 o'clock */
.wheel-needle {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-top: 28px solid var(--accent-danger);
    z-index: 10;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
}

/* Center circle button on the wheel */
.wheel-center-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: var(--gradient-accent);
    border: 4px solid var(--bg-secondary);
    color: #ffffff;
    font-weight: 850;
    font-size: 13px;
    letter-spacing: 0.05em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 20px rgba(124, 92, 252, 0.4);
    z-index: 8;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wheel-center-button:hover {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 25px rgba(124, 92, 252, 0.6);
}

.wheel-center-button:active {
    transform: translate(-50%, -50%) scale(0.94);
}

/* Winner History List */
.history-list {
    margin-top: 1rem;
}

#history-list {
    padding: 0;
    margin: 0;
    list-style: none;
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    animation: slideIn 0.3s ease;
}

.history-time {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-weight: 600;
}

.history-winner-name {
    font-weight: 700;
    color: var(--accent-secondary);
}

/* Winner Announcement Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--modal-overlay-bg, rgba(0, 0, 0, 0.65));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    display: none !important;
}

.modal-card {
    background: var(--bg-card-solid);
    border: 2px solid var(--border-accent);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 480px;
    width: 90%;
    text-align: center;
    animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-sparkles {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #747cff;
}

.winner-display-box {
    font-size: 2.2rem;
    font-weight: 900;
    padding: 1.2rem 2rem;
    background: rgba(124, 92, 252, 0.08);
    border: 1.5px dashed var(--accent-secondary);
    border-radius: 16px;
    color: #5496fd;
    text-shadow: 0 0 20px rgba(0, 212, 232, 0.4);
    margin-bottom: 1.5rem;
    word-break: break-word;
}

.modal-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-actions .btn {
    flex: 1;
}

/* Keyframes Animations */
@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes modalPop {
    from {
        transform: scale(0.85);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsiveness for Spin Wheel Layout */
@media (max-width: 992px) {
    .spin-wheel-grid {
        display: flex;
        flex-direction: column-reverse;
        gap: 2rem;
    }

    .sw-left-panel,
    .sw-right-panel {
        width: 100% !important;
        box-sizing: border-box;
    }

    .sw-right-panel {
        align-items: center !important;
        justify-content: center !important;
    }

    .wheel-main-container {
        max-width: 400px;
        width: 100% !important;
        align-self: center !important;
        /* Centering it horizontally inside the flex container */
    }

    .wheel-center-button {
        width: 72px;
        height: 72px;
        font-size: 11px;
        border-width: 3.5px;
    }

    .wheel-needle {
        top: -12px;
        border-left-width: 13px;
        border-right-width: 13px;
        border-top-width: 24px;
    }
}

@media (max-width: 480px) {
    .wheel-center-button {
        width: 58px;
        height: 58px;
        font-size: 10px;
        border-width: 3px;
    }

    .wheel-needle {
        top: -10px;
        border-left-width: 11px;
        border-right-width: 11px;
        border-top-width: 20px;
    }
}

/* ============================================
   BULK QR CODE STYLES
   ============================================ */
.bulk-qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.25rem;
    margin-top: 0.5rem;
    width: 100%;
}

.bulk-qr-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    transition: all 0.25s ease;
}

.bulk-qr-card:hover {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bulk-qr-canvas-container {
    width: 100%;
    max-width: 120px;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    padding: 6px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.bulk-qr-canvas-container canvas,
.bulk-qr-canvas-container img {
    max-width: 108px !important;
    max-height: 108px !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 4px;
}

.bulk-qr-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ============================================
   CALCULATOR TOOL STYLES
   ============================================ */
.calculator-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.calculator-panel {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

/* Mode Switch */
.calculator-mode-switch {
    display: flex;
    gap: 0.75rem;
    padding: 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    width: fit-content;
}

.mode-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 0.6rem 0.95rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.mode-btn.active {
    background: var(--gradient-accent);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(124, 92, 252, 0.25);
}

.mode-btn:hover {
    color: var(--text-primary);
}

.calculator-view,
.converter-view {
    transition: all 0.25s ease;
}

.calculator-view.hidden,
.converter-view.hidden {
    display: none;
}

/* Display Section */
.calculator-display {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    overflow: hidden;
    word-break: break-all;
    margin-bottom: 0.5rem;
}

.calc-history {
    font-size: 0.95rem;
    color: var(--text-secondary);
    min-height: 24px;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.calc-input {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0.5rem;
    line-height: 1.1;
    transition: all 0.1s ease;
}

/* Converter Section */
.converter-card {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-card);
}

.converter-head h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.converter-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.converter-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.converter-input,
.converter-select {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.8rem 0.9rem;
    background: var(--bg-input);
    color: var(--text-primary);
}

.converter-grid-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.converter-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.converter-field label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.converter-action {
    width: 100%;
}

.converter-result {
    min-height: 3rem;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    background: rgba(0, 201, 219, 0.1);
    color: var(--text-primary);
    line-height: 1.55;
    border: 1px solid rgba(0, 201, 219, 0.2);
}

/* Keypad Grid */
.calculator-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.calculator-grid .btn {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1.25rem;
    font-weight: 600;
    height: 60px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

/* Keypad Button Colors */
.btn-num {
    background: var(--bg-card);
    color: var(--text-primary);
}

.btn-num:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-action {
    background: rgba(124, 92, 252, 0.15);
    color: var(--accent-secondary);
}

.btn-action:hover {
    background: rgba(124, 92, 252, 0.25);
    border-color: var(--accent-primary);
}

.btn-operator {
    background: rgba(0, 201, 219, 0.1);
    color: #00d4e8;
}

.btn-operator:hover {
    background: rgba(0, 201, 219, 0.2);
    border-color: var(--accent-secondary);
}

.btn-equals {
    background: var(--gradient-accent);
    color: #ffffff;
    grid-column: span 1;
}

.btn-equals:hover {
    box-shadow: 0 0 15px rgba(124, 92, 252, 0.4);
    transform: scale(1.02);
}

/* History Panel */
.history-panel {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 440px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.history-header h3 {
    font-size: 1rem;
    font-weight: 700;
}

.btn-clear-history {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-clear-history:hover {
    color: var(--accent-danger);
    background: rgba(239, 68, 68, 0.1);
}

.btn-clear-history svg {
    width: 16px;
    height: 16px;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-right: 4px;
}

.history-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
}

.history-expr {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.history-res {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.history-empty {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .calculator-container {
        grid-template-columns: 1fr;
    }

    .converter-grid-fields {
        grid-template-columns: 1fr;
    }
}

/* Root level sidebar (non-tool pages footer sidebar) rules */
body>.tool-sidebar {
    display: none;
}

@media (max-width: 992px) {
    body>.tool-sidebar {
        display: flex;
        position: fixed;
        top: 64px;
        left: 0;
        bottom: 0;
        width: 280px;
        height: calc(100vh - 64px);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        background: var(--bg-secondary);
        border-right: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
    }

    body>.tool-sidebar.open {
        transform: translateX(0);
    }
}

/* ============================================
   GPU HARDWARE ACCELERATION
   ============================================ */
.tool-sidebar,
.sidebar-search-box input,
.tool-content-card,
.winner-display-box {
    will-change: transform, backdrop-filter;
}

/* ============================================
   SKELETON LOADER & SHIMMER ANIMATION
   ============================================ */
.skeleton-loader {
    position: relative;
    overflow: hidden;
}

.skeleton-loader::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.04) 20%,
            rgba(255, 255, 255, 0.08) 60%,
            rgba(255, 255, 255, 0) 100%);
    animation: shimmer 1.5s infinite;
}

[data-theme="light"] .skeleton-loader::after {
    background-image: linear-gradient(90deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.02) 20%,
            rgba(0, 0, 0, 0.05) 60%,
            rgba(0, 0, 0, 0) 100%);
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* ============================================
   PREMIUM FEATURE & LIMITATION MODAL
   ============================================ */
.premium-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 1rem;
}

.premium-modal-overlay.open {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.premium-modal-card {
    background: var(--bg-card, #1e1e2e);
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 20px;
    padding: 1.5rem;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.premium-modal-overlay.open .premium-modal-card {
    transform: scale(1);
}

.btn-modal-close {
    background: none;
    border: none;
    color: var(--text-tertiary, #a6adc8);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-modal-close:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary, #cdd6f4);
}