:root {
    --primary-color: #2c5530;
    --secondary-color: #8b4513;
    --accent-color: #d4af37;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
[data-theme="dark"] {
    --primary-color: #4a7c59;
    --secondary-color: #a86c3d;
    --accent-color: #e6c44c;
    --text-dark: #e2e8f0;
    --text-light: #a0aec0;
    --bg-light: #1a202c;
    --bg-white: #2d3748;
    --border-color: #4a5568;
    --shadow: 0 10px 30px rgba(0,0,0,0.3);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.4);
}
* { margin:0; padding:0; box-sizing:border-box; }
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-light);
    transition: var(--transition);
}

.admin-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.admin-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}
.admin-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-dark);
}
.kanji-logo {
    font-size: 1.5rem;
    color: var(--primary-color);
}
.admin-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}
.btn-primary {
    background: var(--accent-color);
    color: var(--text-dark);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.btn-outline {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}
.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.btn-danger {
    background: #e53e3e;
    color: white;
}
.btn-danger:hover {
    background: #c53030;
    transform: translateY(-2px);
}
.btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; }
.btn-xs { padding: 0.25rem 0.5rem; font-size: 0.7rem; }

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: 50%;
}
.theme-toggle:hover {
    background: var(--bg-light);
    transform: rotate(15deg);
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}
.admin-welcome {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    text-align: center;
    border: 1px solid var(--border-color);
}
.admin-welcome h1 {
    font-family: 'Noto Serif JP', serif;
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: var(--text-dark);
}
.admin-welcome p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    background: var(--bg-white);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}
.admin-tab {
    padding: 0.75rem 1.5rem;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    color: var(--text-dark);
    white-space: nowrap;
}
.admin-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.admin-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tab-content { display: none; }
.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.admin-form-section {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}
.admin-form-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}
.admin-form-section h4 {
    font-size: 1.25rem;
    margin: 2rem 0 1rem;
    color: var(--text-dark);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}
.form-group {
    display: flex;
    flex-direction: column;
}
.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}
.form-control {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-white);
    color: var(--text-dark);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44,85,48,0.1);
}
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { cursor: pointer; }
select.form-control[multiple] {
    height: auto;
    min-height: 120px;
}
.form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.image-preview {
    width: 200px;
    height: 150px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.5rem;
    background: var(--bg-light);
    overflow: hidden;
}
.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    margin-bottom: 0;
}

.schedule-item-form {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}
.schedule-item-form .form-row {
    grid-template-columns: 1fr 1fr 1fr auto;
}

.admin-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.admin-items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.admin-item-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.admin-item-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.admin-item-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}
.admin-item-card h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}
.admin-item-card p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}
.admin-item-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}
.admin-item-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
    flex-wrap: wrap;
}

.gallery-management {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.gallery-management-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
}
.gallery-management-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-management-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.25rem;
}

.feedback-item, .booking-item {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}
.feedback-header, .booking-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.feedback-name, .booking-activity {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.1rem;
}
.feedback-email, .booking-contact {
    color: var(--primary-color);
    font-size: 0.9rem;
}
.feedback-date, .booking-date {
    color: var(--text-light);
    font-size: 0.8rem;
    white-space: nowrap;
}
.feedback-message, .booking-details {
    color: var(--text-dark);
    line-height: 1.5;
    margin-bottom: 1rem;
    white-space: pre-wrap;
}
.booking-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
}
.booking-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.booking-info-label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 600;
}
.booking-info-value {
    font-size: 0.9rem;
    color: var(--text-dark);
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    animation: slideIn 0.3s ease;
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}
.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--border-color);
}
.empty-state h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .admin-nav-container { padding: 1rem; }
    .admin-container { padding: 1rem; }
    .admin-tabs { flex-direction: column; }
    .admin-tab { text-align: center; }
    .admin-items-grid { grid-template-columns: 1fr; }
    .admin-actions { flex-direction: column; gap: 0.5rem; }
    .form-actions { flex-direction: column; }
    .admin-item-actions { flex-direction: column; }
    .form-row { grid-template-columns: 1fr; }
    .schedule-item-form .form-row { grid-template-columns: 1fr; gap: 0.5rem; }
    .feedback-header, .booking-header { flex-direction: column; align-items: flex-start; }
    .booking-info { grid-template-columns: 1fr; }
    .gallery-management { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}