/* Components & app-specific UI styles extracted from style.css */

/* Loading Bar */
.loading-bar {
    position: fixed;
    top: 61px; /* Below the top bar */
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 999;
    overflow: hidden;
}

.loading-bar-progress {
    height: 100%;
    background: linear-gradient(90deg, 
        var(--accent) 0%, 
        #00d4ff 50%, 
        var(--accent) 100%);
    background-size: 200% 100%;
    animation: loading-animation 1.5s ease-in-out infinite;
    width: 100%;
}

@keyframes loading-animation {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.loading-bar[hidden] { display: none; }

/* Header & layout */
main { max-width: 980px; margin: 0 auto; }
header { margin: 82px 0 12px 0; }
.title { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.app-title { font-size: 2rem; margin: 0; letter-spacing: 0.2px; font-weight: 800; animation: title-pop 600ms ease both; }
.brand-gradient {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.subtitle { color: var(--muted); margin: 0; font-weight: 500; animation: subtitle-in 500ms ease both; animation-delay: 80ms; }
@keyframes title-pop { from { opacity: 0; transform: translateY(6px) scale(0.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes subtitle-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
header::after { content: ""; display: block; height: 2px; width: 140px; margin: 10px auto 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; }

.header-actions { display: flex; gap: 16px; justify-content: center; margin-bottom: 16px; margin-top: 8px; }

/* Date Selector */
.date-selector { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.date-input {
    padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font-size: 0.95rem; font-weight: 500; cursor: pointer;
    transition: border-color var(--motion-fast) ease; color-scheme: dark;
}
:root.light-theme .date-input { color-scheme: light; }
.date-input::-webkit-calendar-picker-indicator { cursor: pointer; filter: invert(0.8); }
:root.light-theme .date-input::-webkit-calendar-picker-indicator { filter: invert(0); }
.date-input:hover { border-color: var(--accent); }
.date-input:focus { outline: none; border-color: var(--accent); }
.date-nav-btn { background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 1rem; transition: all var(--motion-fast) ease; }
.date-nav-btn:hover { background: var(--hover); border-color: var(--accent); transform: scale(1.05); }
.date-nav-btn:active { transform: scale(0.95); }

/* Controls & Status */
.controls { display:flex; gap:8px; align-items:center; margin:16px 0; flex-wrap:wrap; position: relative; }
.controls .spacer { flex: 1 1 auto; }
.controls input[type="number"] { width:160px; padding:8px 10px; border-radius:8px; }
.toggle-compact { display:flex; align-items:center; gap:6px; padding:4px 8px; border:1px solid var(--border); border-radius:8px; background: var(--surface); }
.toggle-compact input { transform: scale(1.1); }
.toggle-compact { display: none !important; }

.status { margin-top: 10px; padding: 10px 12px; background: var(--hover); border: 1px solid var(--border); border-radius: 8px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.status[hidden] { display: none; }
.status strong { font-weight: 700; }

/* Buttons */
.btn { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font-weight: 600; line-height: 1; transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease, filter var(--motion-fast) ease; }
.btn:hover { filter: brightness(1.05); transform: translateY(-1px) scale(1.01); }
.btn:active { transform: translateY(0); filter: brightness(1.0); }
.btn-primary { background: #2563eb; border-color: #2563eb; color: #ffffff; }
.btn-ghost { background: transparent; border-color: var(--border); }

/* Big Print button */
.btn-print { background: var(--print-bg); color: var(--print-text); border-color: var(--print-border); padding: 10px 18px; font-size: 1.05rem; border-radius: 10px; box-shadow: 0 6px 16px rgba(0,0,0,0.25); }
.btn-print:hover { filter: brightness(1.1); }
.btn-print:active { transform: translateY(1px); }

/* Dropdown */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu { position: absolute; top: calc(100% + 4px); right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); z-index: 1000; min-width: 200px; padding: 6px; overflow: hidden; }
.dropdown-item { display: flex; align-items: center; width: 100%; padding: 12px 16px; border: none; background: transparent; color: var(--text); text-align: left; cursor: pointer; border-radius: 8px; font-size: 0.95rem; font-weight: 500; transition: background-color var(--motion-fast) ease, transform var(--motion-fast) ease; gap: 8px; }
.dropdown-item:hover { background: var(--hover); transform: translateX(2px); }
.dropdown-item:active { background: var(--border); transform: translateX(0); }
.dropdown-item svg { flex-shrink: 0; }

/* Empty State */
.empty-state { text-align: center; padding: 60px 20px; background: var(--surface); border: 2px dashed var(--border); border-radius: 12px; margin: 20px 0; animation: fadeIn 0.3s ease; }
.empty-state-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.7; }
.empty-state-title { font-size: 1.25rem; font-weight: 600; color: var(--text); margin: 0 0 8px 0; }
.empty-state-text { font-size: 0.95rem; color: var(--muted); margin: 0; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Tabs */
.tabs { display:flex; gap:6px; justify-content:center; margin: 14px 0 10px; padding-bottom: 6px; position: relative; }
.tab { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font-weight: 600; line-height: 1; transition: transform var(--motion-fast) ease, background-color var(--motion-fast) ease; }
.tab:hover { transform: translateY(-1px); }
.tab.active { background: var(--hover); border-color: var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,0.08); position: relative; }
.tab.active::after { content: ""; position: absolute; height: 3px; left: 16px; right: 16px; bottom: -6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Quick actions and icon buttons */
.quick-actions { position: absolute; top: 56px; right: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 10; }
.icon-btn { background: transparent; border: 1px solid var(--border); padding: 8px 12px; cursor: pointer; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--text); transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease; font-size: 1.1rem; }
.circle-btn { border-radius: 50%; width: 40px; height: 40px; padding: 0; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; box-shadow: 0 2px 8px rgba(0,0,0,0.04); background: var(--surface); border: 1.5px solid var(--border); margin: 0 6px; }
.icon-btn:hover { background: var(--hover); border-color: var(--accent); }
.icon-btn:active { transform: scale(0.95); }

/* Theme toggle */
.theme-toggle { position: absolute; top: 16px; right: 16px; display: flex; flex-direction: row; align-items: center; gap: 8px; }
.theme-toggle button { background: none; border: none; padding: 8px; cursor: pointer; border-radius: 50%; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: var(--surface); box-shadow: 0 2px 8px rgba(0,0,0,0.15); transition: transform var(--motion-fast) ease, background-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease; }
.theme-toggle button:hover { background: var(--border); transform: translateY(-1px); }
.theme-toggle button:active { transform: translateY(0) rotate(-8deg); }
.theme-icon { font-size: 1.2rem; line-height: 1; }
