/* 広告申込フォームスタイル */
.ad-application-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.application-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.application-header h2 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.application-header p {
    color: #666;
    font-size: 1.1rem;
}

/* ステップフォーム */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* フォーム要素 */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

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

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

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 広告タイプ選択 */
.type-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 0.5rem;
}

.type-option input {
    display: none;
}

.type-option .option-content {
    padding: 1.5rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.type-option input:checked + .option-content {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.type-option i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 0.5rem;
    display: block;
}

/* 画像アップロード */
.image-upload-container {
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.3s ease;
}

.image-upload-container:hover {
    border-color: #667eea;
}

.upload-preview {
    margin-top: 1rem;
    position: relative;
    display: inline-block;
}

.upload-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.remove-image {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
}

/* 料金概要 */
.price-summary {
    background: #f8f9ff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.price-breakdown .price-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.price-breakdown .price-item.total {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.2rem;
    color: #667eea;
}

/* 支払い方法 */
.payment-options {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.payment-radio input {
    display: none;
}

.payment-content {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-radio input:checked + .payment-content {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.payment-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.payment-header i {
    font-size: 1.5rem;
    color: #667eea;
}

.payment-header h4 {
    margin: 0;
    flex: 1;
}

.badge {
    background: #4cd964;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.payment-features {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.payment-features span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

/* 銀行情報 */
.bank-details {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.bank-detail {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.bank-detail:last-child {
    border-bottom: none;
}

/* フォームアクション */
.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f0f0f0;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #667eea;
    border-radius: 8px;
    background: #667eea;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* ローディング */
#application-loading {
    text-align: center;
    padding: 3rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 結果表示 */
.application-success {
    text-align: center;
    padding: 2rem;
}

.success-icon {
    font-size: 4rem;
    color: #4cd964;
    margin-bottom: 1rem;
}

.application-details {
    background: #f8f9ff;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: left;
}

.bank-instructions {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: left;
}

/* エラー表示 */
.form-error {
    background: #ffe6e6;
    border: 1px solid #ff4757;
    color: #ff4757;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .ad-application-container {
        padding: 1rem;
        margin: 1rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .type-options {
        grid-template-columns: 1fr;
    }
    
    .payment-features {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* 広告表示スタイル */
.ad-slot {
    position: relative;
    margin: 1rem 0;
    text-align: center;
}

.ad-slot.active-ad {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    background: white;
}

.ad-slot.empty-slot {
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 2rem;
    background: #f8f9fa;
}

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

.recruitment-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.recruitment-link:hover {
    color: #5a6fd8;
    transform: translateY(-2px);
}

.recruitment-link i {
    font-size: 2rem;
}

.slot-price {
    font-size: 0.8rem;
    color: #666;
    font-weight: normal;
}

.ad-label {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* 画像広告 */
.ad-image-link {
    display: block;
    transition: opacity 0.3s ease;
}

.ad-image-link:hover {
    opacity: 0.9;
}

.ad-image-link img {
    border-radius: 6px;
    display: block;
    margin: 0 auto;
}

/* テキスト広告 */
.ad-text-content {
    text-align: left;
}

.ad-text-content h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.1rem;
}

.ad-company {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
}

.ad-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0 0 1rem 0;
}

.ad-cta-button {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

.ad-cta-button:hover {
    background: #5a6fd8;
}

/* 広告申込ページレイアウト */
.ad-application-page .page-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

/* サイドバーウィジェット */
.sidebar-widget {
    background: #f8f9fa;
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 12px;
    border-left: 4px solid #2c5aa0;
}

.sidebar-widget h3 {
    color: #2c5aa0;
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: 600;
}

/* 利用可能な広告枠 */
.slots-list .slot-item {
    background: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.slot-item .slot-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.slot-item .slot-price {
    color: #2c5aa0;
    font-size: 1.1em;
    font-weight: 600;
}

.slot-item .slot-dimensions {
    color: #666;
    font-size: 0.9em;
}

/* 申込フロー */
.process-steps {
    list-style: none;
    padding: 0;
}

.process-steps li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.process-steps li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.step-number {
    background: #2c5aa0;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    font-weight: 600;
    margin-right: 15px;
    flex-shrink: 0;
}

.step-text {
    color: #333;
    font-size: 0.95em;
}

/* ボタンスタイル */
.button {
    display: inline-block;
    padding: 12px 25px;
    background: #2c5aa0;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    border: 2px solid #2c5aa0;
}

.button:hover {
    background: #1e3d6f;
    color: white;
}

.button-outline {
    background: transparent;
    color: #2c5aa0;
}

.button-outline:hover {
    background: #2c5aa0;
    color: white;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .ad-application-page .page-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .sidebar-widget {
        padding: 20px;
    }
}

/* フォームの既存スタイルを補完 */
.ad-application-container {
    max-width: 100%;
}

.progress-container {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    margin: 30px 0;
    overflow: hidden;
}

.progress-bar {
    background: #2c5aa0;
    height: 100%;
    transition: width 0.3s ease;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* 管理画面スタイル */
.status-badge {
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

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

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

.payment-badge.payment-failed {
    background: #f8d7da;
    color: #721c24;
}

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

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #2271b1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-icon {
    float: left;
    margin-right: 15px;
    width: 50px;
    height: 50px;
    background: #2271b1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.stat-content h3 {
    margin: 0 0 5px 0;
    font-size: 24px;
    color: #2271b1;
}

.stat-content p {
    margin: 0;
    color: #666;
}

/* ダッシュボードレイアウト */
.dashboard-columns {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.dashboard-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.dashboard-card h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* 銀行振込統計 */
.bank-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    text-align: center;
}

.bank-stat {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #2271b1;
}

.stat-number.pending {
    color: #ffc107;
}

.stat-number.paid {
    color: #28a745;
}

.stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

/* システム情報 */
.system-info .info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

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

/* クイックアクション */
.quick-actions {
    display: grid;
    gap: 10px;
}

.quick-actions .button {
    text-align: center;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .dashboard-columns {
        grid-template-columns: 1fr;
    }
    
    .ad-stats-cards {
        grid-template-columns: 1fr;
    }
    
    .bank-stats {
        grid-template-columns: 1fr;
    }
}

/* レポートフィルター */
.report-filter {
    display: flex;
    gap: 15px;
    align-items: end;
    flex-wrap: wrap;
}

.report-filter label {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.report-filter input {
    margin: 0;
}

/* エクスポートセクション */
.export-actions {
    text-align: center;
    padding: 20px;
}

.export-actions .button {
    margin-bottom: 10px;
}

/* 設定ページ */
.form-table th {
    width: 200px;
}

.form-table textarea.large-text {
    width: 100%;
    max-width: 600px;
}

/* システム情報 */
.system-info-table {
    width: 100%;
    border-collapse: collapse;
}

.system-info-table th,
.system-info-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.system-info-table th {
    background: #f9f9f9;
    width: 200px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .report-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .report-filter label {
        width: 100%;
    }
    
    .form-table th {
        width: 100%;
        display: block;
    }
    
    .form-table td {
        display: block;
        width: 100%;
    }
}

/* 非表示フィールドのバリデーションを無効化 */
.ad-fields[style*="display: none"] input,
.ad-fields[style*="display: none"] textarea,
.ad-fields[style*="display: none"] select {
    /* ブラウザのバリデーションを回避 */
    visibility: hidden;
    height: 0;
    padding: 0;
    border: 0;
    position: absolute;
    left: -9999px;
}