﻿:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-input: #334155;
    --primary: #2563eb;
    --primary-hover: #3b82f6;
    --expired: #064e3b;
    --warning: #dc2626;
    --attention: #ca8a04;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    padding-bottom: 100px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

header {
    padding: 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

header .logo-box {
    background: var(--primary);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-card {
    background: linear-gradient(135deg, #1d4ed8, #4338ca);
    border-radius: 30px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.summary-card h2 {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 20px;
    font-weight: bold;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.stat-label {
    font-size: 0.75rem;
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
    color: rgba(255, 255, 255, 0.8);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
}

.bg-expired { background-color: var(--expired); }
.bg-warning { background-color: var(--warning); }
.bg-attention { background-color: var(--attention); }

.section-title {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 15px;
    padding-left: 10px;
}

.item-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.item-card {
    background-color: var(--bg-card);
    border: 2px solid #334155;
    padding: 20px;
    border-radius: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s;
}

.item-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-icon {
    background: #334155;
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.item-details h3 {
    font-size: 1.1rem;
    margin-bottom: 2px;
    font-weight: bold;
}

.item-details p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.item-status {
    text-align: right;
    display: flex;
    align-items: center;
    gap: 12px;
}

.days-left-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 70px;
}

.days-left {
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 4px;
}

.days-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: bold;
    white-space: nowrap;
}

.action-btns {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-btn:hover { color: var(--primary-hover); background: rgba(37, 99, 235, 0.1); }
.delete-btn:hover { color: #ef4444; background: rgba(239, 68, 68, 0.1); }

.card-expired { border-color: #10b981; color: #10b981; }
.card-warning { border-color: #ef4444; color: #f87171; }
.card-attention { border-color: #fbbf24; color: #fbbf24; }

.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background: var(--primary);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.4);
    z-index: 10;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--bg-card);
    width: 100%;
    max-width: 450px;
    border-radius: 35px;
    padding: 30px;
    border: 1px solid #334155;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-group input, .form-group select {
    width: 100%;
    background: var(--bg-input);
    border: 2px solid #475569;
    padding: 15px;
    border-radius: 15px;
    color: white;
    font-size: 1rem;
    outline: none;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.form-group input:focus {
    border-color: var(--primary);
    background: #1e293b;
}

.submit-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 18px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
}

.btn-cancel { background: #334155; color: var(--text-main); border: none; padding: 15px; border-radius: 15px; cursor: pointer; }
.btn-danger { background: #ef4444; color: white; border: none; padding: 15px; border-radius: 15px; cursor: pointer; font-weight: bold;}