/* admin.css - 管理画面固有スタイル（admin-common.cssと併用） */

/* ==================== QRコード表示 ==================== */
.qr-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 16px;
    margin-top: 1rem;
}

.qr-image {
    width: 180px;
    height: 180px;
    background: white;
    border-radius: 12px;
    padding: 8px;
}

.qr-info {
    margin-top: 1rem;
    text-align: center;
}

.qr-table {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.qr-session {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    font-family: monospace;
}

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

/* ==================== セッションアイテム ==================== */
.session-item {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.session-item:hover {
    border-color: var(--accent);
}

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

.session-table {
    font-size: 1.25rem;
    font-weight: 700;
}

.session-status {
    font-size: 0.6875rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-weight: 600;
}

.session-status.active {
    background: rgba(74, 222, 128, 0.15);
    color: var(--success);
}

.session-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.session-total {
    font-weight: 700;
    color: var(--accent);
    font-size: 1rem;
}

.session-pending {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.pending-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning);
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.pending-badge:hover {
    background: rgba(251, 191, 36, 0.3);
}

.pending-badge.none {
    background: rgba(74, 222, 128, 0.15);
    color: var(--success);
}

.session-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* ==================== 会計リクエスト ==================== */
.checkout-item {
    padding: 1rem;
    background: rgba(251, 191, 36, 0.1);
    border: 2px solid var(--warning);
    border-radius: 12px;
    animation: checkoutPulse 2s infinite;
}

@keyframes checkoutPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(251, 191, 36, 0); }
}

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

.checkout-table {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--warning);
}

.checkout-total {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent);
}

.checkout-orders {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    max-height: 120px;
    overflow-y: auto;
}

.checkout-order-item {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    border-bottom: 1px dashed var(--border);
}

.checkout-order-item:last-child {
    border-bottom: none;
}

/* ==================== 注文カード（モーダル内） ==================== */
.order-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

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

.order-id {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.order-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.order-status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
}

.order-status-badge.confirmed {
    background: rgba(96, 165, 250, 0.15);
    color: var(--info);
}

.order-status-badge.preparing {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning);
}

.order-status-badge.completed {
    background: rgba(74, 222, 128, 0.15);
    color: var(--success);
}

.order-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border);
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-name {
    font-weight: 500;
}

.order-item-detail {
    display: flex;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.order-item-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.btn-cancel-item {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid var(--danger);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel-item:hover {
    background: var(--danger);
    color: white;
}

.order-subtotal {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-weight: 600;
}

.no-orders {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* ==================== 未提供品モーダル ==================== */
.pending-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    gap: 0.75rem;
}

.pending-item-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.pending-item-name {
    font-weight: 600;
}

.pending-item-qty {
    color: var(--accent);
    font-weight: 700;
}

.pending-item-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    white-space: nowrap;
}

.pending-item-status.confirmed {
    background: rgba(96, 165, 250, 0.15);
    color: var(--info);
}

.pending-item-status.preparing {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning);
}

.pending-item .btn-cancel-item {
    flex-shrink: 0;
}

.last-update {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: right;
    margin-top: 0.5rem;
}

/* ==================== AI設定画面 ==================== */
.ai-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .ai-settings-grid {
        grid-template-columns: 1fr;
    }
}

.ai-provider-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    border: 2px solid var(--border);
    transition: all 0.2s;
}

.ai-provider-card.active {
    border-color: var(--success);
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.15);
}

.ai-provider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.ai-provider-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ai-provider-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: bold;
}

.ai-provider-logo.openai {
    background: linear-gradient(135deg, #10a37f, #1a7f64);
    color: white;
}

.ai-provider-logo.gemini {
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: white;
}

.ai-provider-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.ai-provider-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
}

.ai-provider-status.active {
    background: rgba(74, 222, 128, 0.15);
    color: var(--success);
}

.ai-provider-status.configured {
    background: rgba(96, 165, 250, 0.15);
    color: var(--info);
}

.ai-provider-status.not-configured {
    background: rgba(138, 138, 154, 0.15);
    color: var(--text-secondary);
}

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

.ai-actions .btn {
    flex: 1;
}

.ai-test-result {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
}

.ai-current-status {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.ai-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.ai-status-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.ai-status-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ai-status-provider {
    font-size: 1.25rem;
    font-weight: 700;
}

.ai-status-model {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-family: monospace;
    background: var(--bg-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
}

.ai-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.ai-status-dot.active {
    background: var(--success);
    animation: pulse 2s infinite;
}

.ai-status-dot.inactive {
    background: var(--text-secondary);
}
