/* リセット & ベース */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: #f8f9fa;
    color: #2c3e50;
    line-height: 1.6;
}

/* ログイン画面 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    margin: 0;
    padding: 20px;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-logo {
    font-size: 2.5em;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.login-subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #dc3545;
}

.login-button {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.login-button:hover {
    transform: translateY(-2px);
}

.back-link {
    margin-top: 20px;
}

.back-link a {
    color: #dc3545;
    text-decoration: none;
    font-weight: bold;
}

.back-link a:hover {
    text-decoration: underline;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: none;
}

.demo-info {
    background: #ffe8e8;
    color: #8b0000;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* ダッシュボード */
.dashboard-header {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-greeting {
    font-size: 1rem;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* メインレイアウト */
.dashboard-main {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 80px);
}

/* サイドバー */
.sidebar {
    width: 240px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    padding: 2rem 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem;
}

.nav-item {
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: #6c757d;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    display: block;
    cursor: pointer;
    border: none;
    background: none;
    text-align: left;
    width: 100%;
}

.nav-item:hover {
    background: #f8f9fa;
    color: #dc3545;
}

.nav-item.active {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

/* コンテンツエリア */
.content-area {
    flex: 1;
    padding: 2rem;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
}

/* メインページ */
.main-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.link-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: left;
    display: block;
}

.link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.2);
}

.link-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #dc3545;
    font-weight: 600;
}

.link-card p {
    color: #6c757d;
    font-size: 0.9rem;
}

/* テーブル */
.data-table {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #f8f9fa;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* ボタン */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

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

.btn-danger:hover {
    background: #c82333;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #dc3545;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* カード */
.card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.card-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.card-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
}

/* レスポンシブ */
@media (max-width: 968px) {
    .dashboard-main {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 1rem 0;
    }

    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 0 1rem;
    }

    .nav-item {
        white-space: nowrap;
    }

    .content-area {
        padding: 1rem;
    }
}

/* ユーティリティ */
.hidden {
    display: none !important;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.error {
    background: #fee;
    color: #c33;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.success {
    background: #e8f5e8;
    color: #2d5a2d;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

/* フィルターセクション */
.filter-section {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
}

.filter-label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9rem;
}

.filter-select,
.filter-input {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #dc3545;
}

.filter-input {
    width: 100%;
}

#clear-filters {
    height: fit-content;
    white-space: nowrap;
}

/* モーダル */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #2c3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #dc3545;
}

.modal-body {
    padding: 1.5rem;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section h4 {
    font-size: 1.2rem;
    color: #dc3545;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-table th {
    background: #f8f9fa;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    width: 150px;
    border-bottom: 1px solid #e9ecef;
}

.detail-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
}

.detail-table tr:last-child th,
.detail-table tr:last-child td {
    border-bottom: none;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 2px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* お知らせ作成フォーム */
.notice-form-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.notice-form {
    margin-top: 1.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e9ecef;
}

.form-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    color: #6c757d;
    font-size: 0.875rem;
}

.required {
    color: #dc3545;
}

