/* css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+JP:wght@400;500;700&display=swap');

:root {
    --primary-color: #374151;
    /* Dark grey dominant */
    --accent-color: #2563eb;
    /* Blue accent */
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-sub: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius-md: 8px;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    background: white;
    /* Default */
}

/* Utility */
.alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    max-width: 320px;
    width: 100%;
    margin: 10px auto;
    text-align: center;
}

.alert-error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* Popup toast (global) */
.popup-toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    transform: translate(-50%, 20px);
    z-index: 9999;
    min-width: 240px;
    max-width: 420px;
    width: 90%;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.popup-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.popup-toast--success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.popup-toast--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.popup-toast--info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}


/* -------------------------------------------
   Global Admin Header & Layout
------------------------------------------- */
/* Fixed Header Styles (Standardized) */
/* Fixed Header Styles (Standardized) */
/* Moved to header.css and linked explicitly in HTML */

/* Layout: Fixed Header + Scrollable Body */
body.admin-body {
    overflow: hidden;
    /* Lock body scroll */
    height: 100vh;
    height: 100dvh;
    /* Mobile browser friendly */
    display: flex;
    flex-direction: column;
}

/* Custom Scroll Wrapper */
.admin-scroller {
    flex: 1;
    overflow-y: auto;
    width: 100%;
    margin-top: 60px;
    /* Adjusted to match new header height */
    /* Push down below header */
    padding-bottom: 40px;
    position: relative;
}

/* Override .wrapper padding inside scroll area */
.admin-scroller .wrapper {
    padding-top: 40px !important;
    /* Adjust from 110px to 40px since header is excluded */
    /* padding-bottom: 0 !important; REMOVED to allow specific page overrides */
}

/* Custom Scrollbar (Webkit) */
.admin-scroller::-webkit-scrollbar {
    width: 10px;
}

.admin-scroller::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
}

.admin-scroller::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 100%);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.admin-scroller::-webkit-scrollbar-thumb:hover {
    background-color: #64748b;
}
