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

:root {
    --primary: #0F1B2D;
    --primary-light: #1A2D47;
    --accent: #D4A853;
    --accent-light: #E8C97A;
    --secondary: #2563EB;
    --secondary-light: #3B82F6;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --bg-light: #F8FAFC;
    --bg-card: #FFFFFF;
    --text-dark: #0F172A;
    --text-body: #334155;
    --text-muted: #94A3B8;
    --white: #FFFFFF;
    --glass: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-sm: 0 1px 3px rgba(15, 27, 45, 0.08);
    --shadow: 0 4px 24px rgba(15, 27, 45, 0.08);
    --shadow-lg: 0 12px 48px rgba(15, 27, 45, 0.12);
    --shadow-glow: 0 0 30px rgba(212, 168, 83, 0.15);
    --border: 1px solid rgba(15, 27, 45, 0.08);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    color: var(--text-body);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Glassmorphism ===== */
.glass-panel {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius);
    border: var(--border);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.glass-panel:hover {
    box-shadow: var(--shadow-lg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* ===== Typography ===== */
h1, h2, h3 {
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

h1 { font-size: 2rem; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-family: 'Montserrat', 'Noto Sans JP', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: var(--transition);
}

.btn:hover::after {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(212, 168, 83, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(212, 168, 83, 0.45);
}

.btn-secondary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(15, 27, 45, 0.2);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: var(--primary-light);
    box-shadow: 0 6px 25px rgba(15, 27, 45, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

/* ===== Navigation ===== */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    margin-bottom: 2rem;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.02em;
}

.logo .logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(15, 27, 45, 0.1);
    color: var(--white);
}

/* ===== Dashboard Grid ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--secondary));
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
    letter-spacing: 0.01em;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1.5px solid #E2E8F0;
    background: var(--white);
    font-size: 0.95rem;
    font-family: 'Montserrat', 'Noto Sans JP', sans-serif;
    color: var(--text-dark);
    transition: var(--transition);
    outline: none;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.15);
}

/* ===== Admin Sidebar ===== */
.admin-sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 2rem 1.25rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 100;
}

.admin-sidebar .logo {
    color: var(--text-dark);
    margin-bottom: 2.5rem;
    padding: 0 0.75rem;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 0.25rem;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-dark);
}

.sidebar-link.active {
    background: var(--white);
    color: var(--primary);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    border-left: 3px solid var(--primary);
}

.main-content {
    margin-left: 260px;
    padding: 2rem 2.5rem;
}

/* ===== Tables ===== */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 2px solid #E2E8F0;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #F1F5F9;
    font-size: 0.9rem;
}

tr:hover td {
    background: rgba(248, 250, 252, 0.8);
}

/* ===== Badges ===== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-success {
    background: #ECFDF5;
    color: #059669;
}

.badge-warning {
    background: #FFFBEB;
    color: #D97706;
}

.badge-danger {
    background: #FEF2F2;
    color: #DC2626;
}

.badge-info {
    background: #EFF6FF;
    color: #2563EB;
}

/* ===== Products / Ad Banner ===== */
.products-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:12px}
.product-card{background:var(--bg-card);border-radius:12px; overflow:hidden; display:flex; flex-direction:column; box-shadow: var(--shadow);}
.product-image{width:100%; height:120px; object-fit:cover; display:block}
.product-body{padding:12px}
.product-desc{color:var(--text-muted); font-size:13px; margin-top:6px}
.ad-banner{margin-top:12px; padding:18px; background:var(--bg-card);border-radius:12px; text-align:center; box-shadow: var(--shadow);}

@media (max-width: 900px){
    .products-grid{grid-template-columns:repeat(2,1fr)}
}

@media (max-width: 480px){
    .products-grid{grid-template-columns:1fr}
}

/* ===== Alerts ===== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.alert-error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.alert-warning {
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out both;
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out both;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 1rem;
    }

    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
}

/* ===== Utility ===== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
