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

body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background-color: #f3f4f6;
    color: #1f2937;
}

/* Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background-color: #ffffff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

.admin-brand {
    font-size: 1.25rem;
    font-weight: 700;
    padding: 1.5rem;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

.admin-nav {
    display: flex;
    flex-direction: column;
}

.nav-btn {
    appearance: none;
    border: none;
    background: transparent;
    text-align: left;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-btn:hover {
    background-color: #f9fafb;
    color: #1f2937;
}

.nav-btn.active {
    background-color: #eff6ff;
    color: #2563eb;
    border-right: 3px solid #2563eb;
}

.preview-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #e5e7eb;
    color: #374151;
    text-decoration: none;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.preview-link:hover {
    background-color: #d1d5db;
}

/* Main Content */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    overflow-y: auto;
}

.main-header {
    margin-bottom: 2rem;
}

.main-header h2 {
    font-size: 1.5rem;
    color: #111827;
}

.admin-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--admin-gold);
}

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

.app-container {
    background: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
}

/* Actions logic */
.action-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.btn {
    appearance: none;
    border: none;
    background-color: #e5e7eb;
    color: #374151;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
}
.btn:hover {
    background-color: #d1d5db;
}

.btn-primary {
    background-color: #2563eb;
    color: #ffffff;
}
.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-danger {
    background-color: #ef4444;
    color: #ffffff;
}
.btn-danger:hover {
    background-color: #dc2828;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}
.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 0.25rem;
}
.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group select,
.form-group textarea {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px #2563eb;
}
.form-group textarea {
    resize: vertical;
    min-height: 80px;
}
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

/* Lists and Items */
.item-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.list-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f9fafb;
}

.item-content {
    flex: 1;
}

.item-title {
    font-weight: 600;
    font-size: 1rem;
    color: #111827;
    margin-bottom: 0.25rem;
}

.item-meta {
    font-size: 0.75rem;
    color: #6b7280;
}
.item-badge {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: 0.5rem;
}
.badge-active { background-color: #dcfce7; color: #166534; }
.badge-inactive { background-color: #f3f4f6; color: #4b5563; }

.item-actions {
    display: flex;
    gap: 0.5rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #10b981;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    font-weight: 500;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(1rem);
}

.toast.hidden {
    opacity: 0;
    transform: translateY(1rem);
    pointer-events: none;
}

/* Switch UI */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #2196F3;
}
input:checked + .slider:before {
  transform: translateX(20px);
}
