/* Lockable Admin Panel - メインスタイルシート */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    margin: 0;
}

/* ログイン画面用のスタイル */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    margin: 0;
}

h1 {
    margin: 0 0 30px 0;
    color: #333;
    text-align: center;
}

h2 {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

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

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

button {
    width: 100%;
    padding: 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 500;
}

button:hover {
    background: #c82333;
}

.error {
    color: #dc3545;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8d7da;
    border-radius: 4px;
}

/* 管理画面スタイル */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    background: #f5f5f5;
}

/* サイドバー */
.admin-sidebar {
    width: 260px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: white;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

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

.nav-item {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left-color: #dc3545;
}

.nav-link.active {
    background: rgba(220, 53, 69, 0.2);
    color: white;
    border-left-color: #dc3545;
    font-weight: 500;
}

.nav-icon {
    font-size: 18px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-icon i {
    font-size: 18px;
    width: 18px;
    text-align: center;
}

.nav-text {
    font-size: 15px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.1);
}

.admin-user-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-name {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

.logout-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 13px;
    padding: 6px 0;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.logout-link i {
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.logout-link:hover {
    color: #dc3545;
}

/* メインコンテンツエリア */
.admin-main-wrapper {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: calc(100% - 260px);
    box-sizing: border-box;
}

.admin-header {
    background: white;
    padding: 20px 40px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-menu-toggle {
    display: none;
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s;
}

.mobile-menu-toggle:hover {
    background: #c82333;
}

.mobile-menu-toggle i {
    margin: 0;
}

.admin-header h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.admin-content {
    flex: 1;
    padding: 40px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* ページタイトルスタイル */
.admin-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* アラートメッセージ */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    border: 1px solid transparent;
}

.alert-success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* 管理アクション */
.admin-actions {
    margin-bottom: 20px;
}

/* ボタン */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

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

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

/* ボタン内のアイコン */
.btn i {
    margin-right: 6px;
}

.btn i:last-child {
    margin-right: 0;
    margin-left: 6px;
}

/* アイコンのみのボタン（テーブル内のアクションボタン） */
.action-buttons .btn i {
    margin: 0;
}

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

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

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* アイコンボタン用のスタイル */
.btn-sm i {
    font-size: 14px;
}

.btn-sm.btn-icon {
    padding: 8px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.btn-edit {
    background: #007bff;
    color: white;
}

.btn-edit:hover {
    background: #0056b3;
}

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

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

/* テーブル */
.admin-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.admin-table thead {
    background: #f8f9fa;
}

.admin-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
}

.admin-table td {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    color: #555;
}

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

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

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

.text-small {
    font-size: 12px;
    color: #6c757d;
    font-family: monospace;
}

.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-buttons .btn-sm {
    min-width: 32px;
    padding: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-buttons .btn-sm i {
    margin: 0;
    font-size: 14px;
}

.inline-form {
    display: inline;
}

/* フォーム */
.form-container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.1);
    max-width: 650px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.required {
    color: #dc3545;
    margin-left: 2px;
    font-weight: 700;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    background: #fff;
    color: #2c3e50;
}

.form-control:hover {
    border-color: #cbd5e0;
}

.form-control:focus {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
    background: #fff;
}

.form-control::placeholder {
    color: #a0aec0;
}

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

select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
}

.form-text {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #718096;
    line-height: 1.5;
}

.form-text i {
    margin-right: 6px;
    width: 16px;
    text-align: center;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e1e8ed;
}

.form-actions .btn {
    flex: 1;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-align: center;
}

.form-actions .btn-primary {
    background: #dc3545;
    color: white;
    border: 2px solid #dc3545;
}

.form-actions .btn-primary:hover {
    background: #c82333;
    border-color: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.form-actions .btn-secondary {
    background: #fff;
    color: #4a5568;
    border: 2px solid #e1e8ed;
}

.form-actions .btn-secondary:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    color: #2d3748;
}

/* 検索フォーム */
.search-form {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.search-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.search-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-field-group label {
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    margin: 0;
}

.search-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    background: #fff;
    color: #2c3e50;
}

.search-input:hover {
    border-color: #cbd5e0;
}

.search-input:focus {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
}

.search-input::placeholder {
    color: #a0aec0;
}

.search-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 10px;
    border-top: 1px solid #e1e8ed;
    align-items: center;
}

.search-btn,
.clear-btn {
    width: 120px;
    height: 44px;
    padding: 0;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    transition: all 0.2s ease;
    border: 2px solid;
    text-decoration: none;
    cursor: pointer;
}

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

.search-btn:hover {
    background: #c82333;
    border-color: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.clear-btn {
    background: #fff;
    color: #4a5568;
    border-color: #e1e8ed;
}

.clear-btn:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    color: #2d3748;
}

/* テキストサイズ */
.text-small {
    font-size: 12px;
    font-family: monospace;
    color: #666;
}

/* ユーザー詳細ページ */
.user-detail-container {
    max-width: 900px;
    margin: 0 auto;
}

.detail-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.detail-card {
    background: white;
    padding: 30px;
    margin-top: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.1);
}

.detail-card h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1e8ed;
}

.detail-list {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 15px 20px;
    margin: 0;
}

.detail-list dt {
    font-weight: 600;
    color: #4a5568;
    padding: 8px 0;
}

.detail-list dd {
    margin: 0;
    padding: 8px 0;
    color: #2c3e50;
    word-break: break-all;
}

.org-list {
    margin: 0;
    padding-left: 20px;
    list-style: disc;
}

.org-list li {
    margin: 5px 0;
    font-family: monospace;
    font-size: 13px;
}

/* フォーム情報 */
.form-info {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
    border-left: 4px solid #4299e1;
}

.form-info p {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-weight: 600;
}

.form-info ul {
    margin: 0;
    padding-left: 20px;
    color: #4a5568;
}

.form-info li {
    margin: 5px 0;
    font-size: 14px;
}

/* ボタン追加スタイル */
.btn-view {
    background: #17a2b8;
    color: white;
}

.btn-view:hover {
    background: #138496;
}

/* バッジ */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

/* チェックボックスラベル */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #dc3545;
}

.checkbox-label span {
    user-select: none;
}

/* コード表示 */
code {
    background: #f1f3f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #dc3545;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-card h3 {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
}

.stat-number {
    margin: 0;
    font-size: 36px;
    font-weight: 700;
    color: #333;
}

.quick-links {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.quick-links h3 {
    margin: 0 0 20px 0;
    color: #333;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.link-card {
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    text-align: center;
    transition: all 0.2s;
}

.link-card:hover {
    background: #e9ecef;
    border-color: #dc3545;
    color: #dc3545;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.code-block {
    display: inline-block;
    padding: 4px 8px;
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    word-break: break-all;
    max-width: 100%;
    overflow-x: auto;
}

/* ページネーション */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pagination-info {
    color: #666;
    font-size: 14px;
}

.pagination-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-link {
    display: inline-block;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    min-width: 40px;
    text-align: center;
}

.pagination-link:hover {
    background: #e9ecef;
    border-color: #dc3545;
    color: #dc3545;
}

.pagination-link-active {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
    font-weight: 600;
}

.pagination-link-disabled {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #adb5bd;
    cursor: not-allowed;
}

.pagination-ellipsis {
    padding: 8px 4px;
    color: #666;
    font-size: 14px;
}

.pagination-link-prev,
.pagination-link-next {
    min-width: 80px;
}

/* QRコード表示用スタイル */
.qr-code-container {
    margin-top: 10px;
    display: flex;
    align-items: flex-end;
    gap: 15px;
    flex-wrap: wrap;
}


.qr-code-image {
    max-width: 300px;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.qr-code-error {
    display: none;
    color: #999;
    font-size: 14px;
}

.qr-code-download-wrapper {
    display: flex;
    align-items: center;
    padding: 5px;
}

.qr-code-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* 銀行口座情報入力フォーム用スタイル */
.bank-account-section {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    background: #f9f9f9;
}

.bank-account-section .form-group {
    margin-bottom: 15px;
}

.bank-account-section .form-group:last-child {
    margin-bottom: 0;
}

.bank-account-section label {
    font-size: 14px;
    font-weight: 500;
}

/* タブUI用スタイル */
.tabs-container {
    width: 100%;
}

.tabs-nav {
    display: flex;
    flex-direction: row;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 0;
}

.tab-btn {
    max-width: fit-content;
    background: none;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    bottom: -2px;
}

.tab-btn:hover {
    color: #333;
    background-color: #f5f5f5;
}

.tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background-color: #fff;
}

.tab-btn i {
    font-size: 14px;
}

.tabs-content {
    position: relative;
    min-height: 200px;
}

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

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

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

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
}

.tab-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.form-check {
    display: flex;
    align-items: start;
    gap: 8px;
}
.qr-code-display {
    text-align: center;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .tabs-nav {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .tabs-nav::-webkit-scrollbar {
        height: 4px;
    }

    .tabs-nav::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .tabs-nav::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 2px;
    }

    .tab-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 10px 16px;
        font-size: 13px;
    }

    .tab-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* レスポンシブデザイン */
@media (max-width: 1200px) {
    .admin-content {
        padding: 30px 20px;
    }
    
    .admin-header {
        padding: 15px 20px;
    }
    
    .form-container {
        padding: 30px 20px;
    }
}

@media (max-width: 992px) {
    .admin-sidebar {
        width: 240px;
    }
    
    .admin-main-wrapper {
        margin-left: 240px;
        width: calc(100% - 240px);
    }
    
    .admin-content {
        padding: 20px 15px;
    }
    
    .admin-header {
        padding: 15px 20px;
    }
    
    .admin-header h2 {
        font-size: 22px;
    }
    
    .form-container {
        padding: 25px 15px;
        margin: 0;
    }
    
    .bucket-items-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1001;
        box-shadow: 2px 0 8px rgba(0,0,0,0.3);
    }
    
    .admin-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .admin-main-wrapper {
        margin-left: 0;
        width: 100%;
    }
    
    .admin-content {
        padding: 15px 10px;
    }
    
    .admin-header {
        padding: 12px 15px;
    }
    
    .admin-header h2 {
        font-size: 20px;
        flex: 1;
    }
    
    .form-container {
        padding: 20px 15px;
    }
    
    .admin-table-container {
        margin: 0 -10px;
        border-radius: 0;
    }
    
    .admin-table {
        font-size: 14px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 10px 8px;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-fields {
        flex-direction: column;
    }
    
    .search-field-group {
        width: 100%;
    }
    
    .search-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .search-btn,
    .clear-btn {
        width: 100%;
    }
    
    .bucket-items-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .bucket-item {
        padding: 10px;
    }
    
    .item-icon {
        font-size: 36px;
    }
    
    .breadcrumb {
        font-size: 12px;
        flex-wrap: wrap;
    }
    
    .detail-card {
        padding: 15px;
    }
    
    .detail-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .detail-list dt {
        font-size: 13px;
        padding-bottom: 5px;
    }
    
    .detail-list dd {
        font-size: 14px;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 1px solid #e1e8ed;
    }
    
    .detail-list dd:last-child {
        border-bottom: none;
    }
    
    .search-form {
        padding: 20px 15px;
    }
    
    .search-fields {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .admin-content {
        padding: 10px 5px;
    }
    
    .admin-header {
        padding: 10px 12px;
    }
    
    .admin-header h2 {
        font-size: 18px;
    }
    
    .form-container {
        padding: 15px 10px;
    }
    
    .admin-table {
        font-size: 12px;
        min-width: 500px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 8px 5px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .btn-sm {
        padding: 5px 8px;
        font-size: 11px;
    }
    
    .action-buttons {
        gap: 4px;
    }
    
    .bucket-items-grid {
        grid-template-columns: 1fr;
    }
    
    .bucket-actions {
        flex-direction: column;
    }
    
    .bucket-actions .btn {
        width: 100%;
    }
    
    .pagination-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .pagination-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .detail-actions {
        flex-direction: column;
    }
    
    .detail-actions .btn {
        width: 100%;
    }
    
    .detail-list {
        grid-template-columns: 1fr;
    }
    
    .detail-list dt {
        font-size: 12px;
    }
    
    .detail-list dd {
        font-size: 13px;
    }
    
    .search-form {
        padding: 15px 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .code-block {
        font-size: 11px;
        padding: 10px;
    }
    
    .qr-code-display {
        flex-direction: column;
        align-items: center;
    }
    
    .qr-code-image {
        max-width: 100%;
        height: auto;
    }
}

/* Bucket詳細ページ */
.bucket-detail-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.breadcrumb-container {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #6c757d;
}

.bucket-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.bucket-items-section {
    margin-bottom: 30px;
}

.bucket-items-section h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bucket-items-section h3 i {
    color: #6c757d;
}

.bucket-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.bucket-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
    transition: all 0.2s;
    position: relative;
}

.bucket-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0,123,255,0.2);
}

.folder-item {
    cursor: pointer;
}

.item-icon {
    font-size: 48px;
    color: #ffa500;
    margin-bottom: 10px;
}

.item-icon i {
    color: #ffa500;
}

.item-name {
    text-align: center;
    margin-bottom: 10px;
    flex: 1;
}

.item-name a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    word-break: break-word;
}

.item-name a:hover {
    color: #007bff;
    text-decoration: underline;
}

.item-actions {
    margin-top: auto;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 64px;
    color: #d0d0d0;
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 16px;
    margin: 0;
}



