/* style.css - 完全版スタイルシート */

/* 基本スタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body { 
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif; 
    max-width: 500px; 
    margin: 50px auto; 
    padding: 20px; 
    background-image: url('/images/wasi1.png');
    line-height: 1.6;
    color: #333;
}

.container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

h2 { 
    color: black; 
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 300;
}

/* フォームスタイル */
.form-group { 
    margin-bottom: 25px; 
}

label { 
    display: block; 
    margin-bottom: 8px; 
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

input[type="text"], 
input[type="password"], 
input[type="email"],
textarea,
select { 
    width: 100%; 
    padding: 14px; 
    border: 2px solid #e9ecef; 
    border-radius: 8px; 
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    font-family: inherit;
}

input[type="text"]:focus, 
input[type="password"]:focus, 
input[type="email"]:focus,
textarea:focus,
select:focus {
    border-color: #008000;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background-color: white;
}

input[type="submit"] { 
    background: #008000; 
    color: white; 
    padding: 16px 30px; 
    border: none; 
    border-radius: 8px; 
    cursor: pointer; 
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

input[type="submit"]:hover { 
    background: #498000ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* メッセージスタイル */
.message { 
    padding: 20px; 
    margin: 25px 0; 
    border-radius: 8px; 
    text-align: center;
    font-weight: 500;
}

.success { 
    background: #d4edda; 
    color: #155724; 
    border: 1px solid #c3e6cb; 
}

.error { 
    background: #f8d7da; 
    color: #721c24; 
    border: 1px solid #f5c6cb; 
}

.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 8px;
}

/* リンクスタイル */
.links {
    text-align: center;
    margin-top: 25px;
}

.links a {
    color: #008000;
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.links a:hover {
    color: #498000ff;
    text-decoration: underline;
}

.back-link {
    text-align: center;
    margin-top: 25px;
}

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

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

/* 特別な要素 */
.email-display {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
    border: 2px solid #e9ecef;
    font-weight: 500;
}

.welcome {
    text-align: center;
    font-size: 18px;
    margin-bottom: 30px;
    color: #555;
    font-weight: 300;
}

.user-info {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

.info-item {
    margin-bottom: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.info-label {
    font-weight: 600;
    color: #555;
    display: inline-block;
    width: 140px;
}admin-sidebar

.info-value {
    color: white;
    font-weight: 500;
}

.actions {
    text-align: center;
    margin-top: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    margin: 0 8px;
    background: linear-gradient(135deg, #118a11, #008000);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: linear-gradient(135deg, #118a11, #008000);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    text-decoration: none;
    color: white;
}

.btn-logout {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.btn-logout:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* チェックボックススタイル */
.checkbox-group {
    margin: 25px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    margin-bottom: 10px;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #008000;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #008000;
    border-color: #008000;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-description {
    font-size: 14px;
    color: #666;
    margin-left: 30px;
    margin-top: 5px;
}

/* 管理者画面スタイル - 追加 */
.admin-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 15px;
}

.admin-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: white;
}

.admin-title {
    color: white;
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    text-align: center;
}

.admin-user-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    color: #666;
    font-weight: 500;
    font-size: 14px;
}

.admin-user-name {
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.admin-user-role {
    background: #008000;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* 統計カード */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stat-card.users {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card.subscribed {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card.today {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stat-card.no-2fa {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.stat-number {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

.stat-label {
    font-size: 13px;
    opacity: 0.9;
    font-weight: 500;
    display: block;
}

/* 管理メニューグリッド */
.admin-menu-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-menu-section {
    background: white;
    border-radius: 12px;
    padding: 20px 15px;
    box-shadow: white;
    border: 1px solid #e9ecef;
}

.admin-menu-section h3 {
    color: white;
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f8f9fa;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-menu-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #008000, #2980b9);
    border-radius: 2px;
}

/* メニューリスト */
.admin-menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-menu-item {
    margin-bottom: 6px;
}

.admin-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 15px;
    background: black;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    border-left: 4px solid transparent;
    font-size: 15px;
    -webkit-tap-highlight-color: transparent;
    min-height: 54px;
}

.admin-menu-link:active {
    transform: scale(0.98);
    background: #008000;
    color: white;
}

.admin-menu-link.active {
    background: #008000;
    color: white;
}

.menu-badge {
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.admin-menu-link.active .menu-badge {
    background: rgba(255,255,255,0.3);
}

/* 特別なメニュー項目 */
.menu-item-warning .admin-menu-link {
    border-left-color: #e74c3c;
    background: #fff5f5;
}

.menu-item-success .admin-menu-link {
    border-left-color: #27ae60;
    background: #f0fff4;
}

.menu-item-info .admin-menu-link {
    border-left-color: #008000;
    background: #f0f8ff;
}

/* 管理者ボタン */
.admin-btn {
    background: #008000;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.admin-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-admin-danger {
    background: #e74c3c;
}

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

.btn-admin-success {
    background: #27ae60;
}

.btn-admin-success:hover {
    background: #229954;
}

.btn-admin-cancel {
    background: #6c757d;
}

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

/* 管理者フォーム */
.admin-content {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-section {
    margin-bottom: 30px;
}

.admin-section h3 {
    color: white;
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f8f9fa;
}

.admin-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

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

.admin-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: white;
}

.admin-form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    color: black;
}

.admin-form-control:focus {
    border-color: #008000;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    flex-wrap: wrap;
}

/* モバイルナビゲーション */
.mobile-admin-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 10px 15px;
    display: flex;
    justify-content: space-around;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item:active {
    background: #f8f9fa;
}

.mobile-nav-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.mobile-nav-text {
    font-size: 11px;
    font-weight: 500;
}

/* タブレット表示 (768px以上) */
@media (min-width: 768px) {
    .admin-container {
        padding: 25px;
        margin: 20px auto;
    }
    
    .admin-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 25px 30px;
    }
    
    .admin-title {
        font-size: 28px;
        text-align: left;
    }
    
    .admin-user-info {
        flex-direction: row;
        gap: 15px;
        font-size: 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
    
    .admin-menu-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .admin-menu-section {
        padding: 25px 20px;
    }
    
    .admin-menu-section h3 {
        font-size: 20px;
    }
    
    .admin-content {
        padding: 30px;
    }
    
    .stat-card {
        padding: 25px 20px;
    }
    
    .stat-number {
        font-size: 32px;
    }
    
    .mobile-admin-nav {
        display: none;
    }
    
    body {
        max-width: 100%;
        margin: 20px auto;
    }
}

/* デスクトップ表示 (1024px以上) */
@media (min-width: 1024px) {
    .admin-container {
        max-width: 1200px;
        padding: 40px;
        margin: 40px auto;
    }
    
    .admin-header {
        margin-bottom: 40px;
        padding: 30px 40px;
    }
    
    .admin-title {
        font-size: 32px;
    }
    
    .stats-grid {
        gap: 25px;
        margin: 40px 0;
    }
    
    .admin-menu-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    .admin-menu-section {
        padding: 30px 25px;
        transition: all 0.3s ease;
    }
    
    .admin-menu-section:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    }
    
    .admin-menu-link {
        padding: 18px 20px;
        font-size: 16px;
    }
    
    .admin-menu-link:hover {
        background: linear-gradient(135deg, #008000, #2980b9);
        color: white;
        transform: translateX(5px);
        border-left-color: #2980b9;
    }
    
    .admin-menu-link:hover .menu-badge {
        background: rgba(255,255,255,0.3);
    }
    
    .stat-card {
        padding: 30px 25px;
        transition: all 0.3s ease;
    }
    
    .stat-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    }
    
    .stat-number {
        font-size: 36px;
    }
    
    .admin-content {
        padding: 40px;
    }
}

/* モバイルでの余白調整 */
@media (max-width: 767px) {
    body {
        padding-bottom: 70px;
        margin: 20px auto;
        padding: 15px;
    }
    
    .container {
        padding: 25px;
    }
    
    h2 {
        font-size: 24px;
    }
    
    .admin-menu-link {
        font-size: 14px;
    }
    
    .admin-menu-section h3 {
        font-size: 16px;
    }
    
    .menu-badge {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .links a {
        display: block;
        margin: 10px 0;
    }
    
    .btn {
        display: block;
        margin: 10px 0;
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn,
    .form-actions .admin-btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* 横長モバイル対応 */
@media (max-width: 767px) and (orientation: landscape) {
    .admin-header {
        flex-direction: row;
        padding: 15px 20px;
    }
    
    .admin-title {
        font-size: 20px;
        text-align: left;
    }
    
    .admin-user-info {
        flex-direction: column;
        gap: 5px;
        font-size: 12px;
    }
    
    .mobile-admin-nav {
        padding: 5px 10px;
    }
    
    .mobile-nav-item {
        padding: 5px 8px;
    }
    
    .mobile-nav-icon {
        font-size: 16px;
    }
    
    .mobile-nav-text {
        font-size: 10px;
    }
}

/* ローディング状態 */
.stat-loading {
    opacity: 0.6;
}

.menu-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* エラー状態 */
.stat-error {
    background: #f8d7da !important;
    color: #721c24 !important;
}

.menu-error {
    border-left-color: #e74c3c !important;
    background: #fff5f5 !important;
}

/* 既存のレスポンシブスタイルを維持 */
@media (max-width: 600px) {
    body {
        margin: 20px auto;
        padding: 15px;
    }
    
    .container {
        padding: 25px;
    }
}

/* タブナビゲーション（既存スタイル維持） */
.tab-navigation {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    color: #008000;
    background: #f8f9fa;
}

.tab-btn.active {
    color: #008000;
    border-bottom-color: #008000;
    background: #f8f9fa;
}

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

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* その他のユーティリティクラス */
.text-center {
    text-align: center;
}

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

.text-right {
    text-align: right;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.p-20 {
    padding: 20px;
}

.hidden {
    display: none;
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .admin-menu-section,
    .admin-header,
    .admin-content,
    .stat-card {
        background: #2d3748;
        color: black;
    }
    
    .admin-menu-link {
        background: white;
        color: black;
    }
    
    .admin-menu-section h3 {
        color: black;
        border-bottom-color: white;
    }
    
    .mobile-admin-nav {
        background: #2d3748;
        border-top-color: white;
    }
    
    .mobile-nav-item {
        color: #cbd5e0;
    }
    
    .admin-form-control {
        background: white;
        border-color: #718096;
        color: black;
    }
}