/* 基本設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #334155;
    line-height: 1.6;
    min-height: 100vh;
}

/* アプリケーションコンテナ */
.app-container {
    display: flex;
    min-height: calc(100vh - 80px); /* フッターの高さを考慮 */
    padding-bottom: 80px; /* フッターの高さ分のパディングを追加 */
}

/* サイドバー */
.sidebar {
    width: 224px;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    border-right: 1px solid #e2e8f0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 2rem 1.5rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    min-height: 60px;
}

.sidebar-logo {
    width: 156px;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
}

.sidebar-nav {
    padding: 1.5rem 0;
}

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

.nav-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    padding: 0 1.5rem;
}

.nav-list {
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #475569;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #1e293b;
    border-left-color: #3b82f6;
}

.nav-link i {
    margin-right: 0.75rem;
    width: 16px;
    text-align: center;
    color: #64748b;
}

.nav-link:hover i {
    color: #3b82f6;
}

/* Nested navigation sub-items */
.nav-sublist {
    list-style: none;
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.nav-sublist .nav-link {
    padding: 0.5rem 1.5rem;
    font-size: 0.8rem;
    color: #64748b;
    border-left: 2px solid transparent;
}

.nav-sublist .nav-link:hover {
    background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 100%);
    color: #475569;
    border-left-color: #94a3b8;
}

.nav-sublist .nav-link i {
    margin-right: 0.5rem;
    width: 14px;
    font-size: 0.75rem;
    color: #94a3b8;
}

.nav-sublist .nav-link:hover i {
    color: #64748b;
}

/* メインコンテンツ */
.main-content {
    flex: 1;
    margin-left: 224px;
    padding: 1rem;
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    max-width: none;
    width: 100%;
}

/* システム設定画面でのメインコンテンツ幅を拡大 */
body .main-content .settings-section {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

/* ヒーロー画像 */
.hero-image {
    width: 180px;
    height: auto;
    display: block;
    margin: 0 auto 2rem auto;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.15);
    border-radius: 24px;
    background: transparent;
}

/* ヒーローセクション */
.hero-section {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

/* .hero-icon, .hero-icon i, @keyframes float は不要なので削除 */

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: #64748b;
    font-weight: 400;
}

/* プロジェクトセクション */
.projects-section {
    flex: 1;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
}

/* ボタン */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

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

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

/* プロジェクトグリッド */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.5rem;
    border-radius: 6px;
}

.project-header:hover {
    background: #f8fafc;
    transform: translateY(-1px);
}

.project-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.project-description {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
}

.project-config {
    margin-top: 0.75rem;
}

.config-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #64748b;
    background: #f8fafc;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.project-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* フッター */
.footer {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-top: 1px solid #e2e8f0;
    padding: 1.6rem;
    text-align: right;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.025em;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.footer p {
    margin: 0;
    font-family: 'Inter', sans-serif;
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header .logo {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: #64748b;
    font-size: 1rem;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.error-message {
    background: #fee2e2;
    color: #dc2626;
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 1rem;
    font-size: 0.875rem;
    position: relative;
    z-index: 1001;
}

/* Prevent modal overlays on login page */
.login-page .modal {
    display: none !important;
}

/* Prevent browser extension modals from interfering with login */
.login-page [class*="extension"],
.login-page [class*="notta"],
.login-page [id*="extension"],
.login-page [class*="1password"],
.login-page [id*="1password"],
.login-page [class*="agilebits"],
.login-page [id*="agilebits"],
.login-page iframe[src*="agilebits"],
.login-page iframe[src*="1password"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    z-index: -9999 !important;
    pointer-events: none !important;
}

/* Prevent 1Password extension interference globally on login page */
.login-page * {
    -webkit-app-region: no-drag !important;
}

/* Hide any potential authentication dialogs */
.login-page [role="dialog"],
.login-page [aria-modal="true"],
.login-page .modal,
.login-page .dialog {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    z-index: -9999 !important;
    pointer-events: none !important;
}

/* Prevent any overlay or backdrop */
.login-page::before,
.login-page::after {
    display: none !important;
}

/* Prevent browser auth dialog styling */
.login-page {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

.user-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.user-details {
    margin-bottom: 0.75rem;
}

.user-name {
    display: block;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.875rem;
}

.user-email {
    display: block;
    color: #64748b;
    font-size: 0.75rem;
}

.admin-badge {
    display: inline-block;
    background: #3b82f6;
    color: white;
    font-size: 0.625rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.25rem;
}

.logout-btn {
    display: flex;
    align-items: center;
    color: #64748b;
    text-decoration: none;
    font-size: 0.75rem;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.logout-btn i {
    margin-right: 0.5rem;
}

.modal-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* 管理画面スタイル */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.admin-title {
    font-size: 2rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.users-section {
    flex: 1;
}

.users-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

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

.users-table th {
    background: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.875rem;
}

.users-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
    font-size: 0.875rem;
}

.users-table tr:last-child td {
    border-bottom: none;
}

.users-table tr:hover {
    background: #f8fafc;
}

.user-disabled {
    opacity: 0.6;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: #374151;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-text {
    font-size: 0.875rem;
}

.delete-warning {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.nav-link.active {
    background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #1e293b;
    border-left-color: #3b82f6;
}

.nav-link.active i {
    color: #3b82f6;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .footer {
        padding: 1.2rem 1rem;
        font-size: 0.75rem;
        height: 56px;
    }
    
    .app-container {
        padding-bottom: 56px;
    }
    
    .main-content {
        min-height: calc(100vh - 56px);
    }
    
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .users-table-container {
        overflow-x: auto;
    }
    
    .users-table {
        min-width: 600px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }
}                                                

/* システム設定画面 */
.settings-section {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* システム設定画面のフォーム幅を拡大 */
.settings-form {
    margin-top: 2rem;
    width: 100%;
}

.settings-form .form-group {
    margin-bottom: 1.5rem;
    width: 100%;
}

.settings-form .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1e293b;
}

.settings-form .form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.settings-form .form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.settings-form .form-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

/* コード規約抽出セクション */
.style-guide-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.style-guide-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.style-guide-section .section-description {
    color: #64748b;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* 通知スタイル */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-success {
    background-color: #10b981;
}

.notification-error {
    background-color: #ef4444;
}                                                                                                                                                