/* 共通CSS */
:root {
    --sidebar-width: 250px;
    --header-height: 60px;
    --color-primary-light: #a8d5ba;
    --color-primary: #2d9557;
    --color-primary-dark: #1e6b3f;
    --color-primary-darker: #0f4c2f;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--color-primary-dark) 0%, var(--color-primary-darker) 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    text-align: center;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-menu a {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: rgba(45, 149, 87, 0.4);
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    background: linear-gradient(135deg, #f0f8f5 0%, #e8f5f0 100%);
}

.content-header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 4px rgba(45, 149, 87, 0.1);
}

.content-header h1 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--color-primary-dark);
}

.content-body {
    padding: 30px;
}

/* カード */
.card-custom {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(45, 149, 87, 0.1);
    margin-bottom: 20px;
    border-left: 4px solid var(--color-primary-light);
}

.card-custom-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e8f5f0;
    color: var(--color-primary-dark);
}

.card-custom-body {
    padding: 20px;
}

/* フォーム */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
    color: var(--color-primary-dark);
}

.form-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ボタン */
.btn-custom {
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    color: white;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

.btn-success-custom {
    background: linear-gradient(135deg, #7ee8b7 0%, var(--color-primary) 100%);
    color: white;
}

.btn-success-custom:hover {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

.btn-danger-custom {
    background-color: #dc3545;
    color: white;
}

.btn-danger-custom:hover {
    background-color: #c0392b;
}

/* テーブル */
.table-custom {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

/* モーダル */
.modal-backdrop-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content-custom {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header-custom {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.modal-body-custom {
    padding: 20px;
}

.modal-footer-custom {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ローディング */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
