/**
 * Dayboro Ad Manager — Dashboard Styles
 * Version: 1.0.0
 * Uses dayboro.au brand colours.
 */

.dam-dashboard { font-family: 'ABeeZee', sans-serif; color: #1A1A1A; max-width: 100%; }
.dam-dashboard * { box-sizing: border-box; }
.dam-dashboard h2 { font-family: 'Poppins', sans-serif; font-size: 1.5rem; font-weight: 700; color: #1A5C2E; margin: 0 0 20px; }
.dam-dashboard h3 { font-family: 'Poppins', sans-serif; font-size: 1.2rem; font-weight: 600; color: #1A5C2E; margin: 0 0 16px; }

/* Buttons */
.dam-btn { display: inline-block; padding: 10px 20px; border-radius: 8px; font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 0.9rem; border: none; cursor: pointer; text-decoration: none; transition: all 0.2s; }
.dam-btn-primary { background: #F59E0B; color: #1A1A1A; }
.dam-btn-primary:hover { background: #d97706; }
.dam-btn-outline { background: transparent; color: #18604A; border: 2px solid #18604A; }
.dam-btn-outline:hover { background: #18604A; color: #fff; }
.dam-btn-danger { background: transparent; color: #dc2626; border: 2px solid #dc2626; }
.dam-btn-danger:hover { background: #dc2626; color: #fff; }
.dam-btn-small { padding: 6px 14px; font-size: 0.82rem; }

/* Overview Stats */
.dam-overview { margin-bottom: 32px; }
.dam-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.dam-stat-card { background: #F0F7F2; border: 1px solid #E0E7EA; border-radius: 12px; padding: 20px 16px; text-align: center; }
.dam-stat-highlight { background: #18604A; }
.dam-stat-highlight .dam-stat-value { color: #F59E0B; }
.dam-stat-highlight .dam-stat-label { color: rgba(255,255,255,0.8); }
.dam-stat-value { font-family: 'Poppins', sans-serif; font-size: 1.6rem; font-weight: 700; color: #1A5C2E; display: block; }
.dam-stat-label { font-size: 0.78rem; color: #555; text-transform: uppercase; letter-spacing: 0.5px; }

/* ROI Section */
.dam-roi { background: #fff; border: 1px solid #E0E7EA; border-radius: 12px; padding: 24px; margin-bottom: 32px; }
.dam-roi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 12px; }
.dam-roi-item { text-align: center; }
.dam-roi-label { display: block; font-size: 0.82rem; color: #555; margin-bottom: 4px; }
.dam-roi-value { display: block; font-family: 'Poppins', sans-serif; font-size: 1.3rem; font-weight: 700; color: #1A5C2E; }
.dam-roi-compare { font-size: 0.9rem; color: #18604A; font-weight: 600; background: #F0F7F2; padding: 10px 14px; border-radius: 8px; margin: 12px 0 0; }

/* A/B Comparison */
.dam-ab { margin-bottom: 32px; }
.dam-ab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dam-ab-card { background: #fff; border: 2px solid #E0E7EA; border-radius: 12px; padding: 20px; position: relative; }
.dam-ab-winner { border-color: #18604A; }
.dam-ab-badge { position: absolute; top: -10px; right: 16px; background: #F59E0B; color: #1A1A1A; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 0.72rem; padding: 4px 12px; border-radius: 20px; text-transform: uppercase; }
.dam-ab-card h4 { font-family: 'Poppins', sans-serif; font-weight: 600; color: #1A5C2E; margin: 0 0 12px; }
.dam-ab-preview { width: 100%; max-height: 120px; object-fit: contain; border-radius: 8px; background: #F0F7F2; margin-bottom: 12px; }
.dam-ab-stats { display: flex; gap: 12px; font-size: 0.88rem; color: #555; }
.dam-ab-stats strong { color: #1A1A1A; }
.dam-ab-verdict { font-size: 0.9rem; color: #555; font-style: italic; margin-top: 12px; }

/* Top Pages */
.dam-top-pages { margin-bottom: 32px; }
.dam-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.dam-table th { background: #18604A; color: #fff; padding: 10px 14px; text-align: left; font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
.dam-table td { padding: 10px 14px; border-bottom: 1px solid #E0E7EA; color: #555; }
.dam-table tr:nth-child(even) td { background: #F4FAF5; }

/* Ad Management */
.dam-manage { margin-bottom: 32px; }
.dam-empty { color: #555; font-style: italic; }

.dam-ads-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.dam-ad-card { display: flex; gap: 16px; background: #fff; border: 1px solid #E0E7EA; border-radius: 12px; padding: 16px; align-items: center; }
.dam-ad-preview { width: 160px; flex-shrink: 0; }
.dam-ad-preview img { width: 100%; border-radius: 8px; }
.dam-ad-placeholder { width: 100%; height: 60px; background: #E0E7EA; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #555; font-size: 0.82rem; }
.dam-ad-info { flex: 1; }
.dam-ad-info h4 { font-family: 'Poppins', sans-serif; font-size: 1rem; font-weight: 600; color: #1A1A1A; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dam-variant-badge { background: #F0F7F2; color: #18604A; font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.dam-status-badge { font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.dam-status-active { background: #dcfce7; color: #15803d; }
.dam-status-paused { background: #fef3c7; color: #92400e; }
.dam-status-expired { background: #fee2e2; color: #991b1b; }
.dam-ad-url { font-size: 0.82rem; color: #555; margin: 0 0 4px; word-break: break-all; }
.dam-ad-mini-stats { font-size: 0.82rem; color: #18604A; font-weight: 600; margin: 0 0 4px; }
.dam-ad-expiry { font-size: 0.78rem; color: #92400e; margin: 0; }
.dam-ad-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }

/* Create/Edit Form */
.dam-form-wrap { background: #F0F7F2; border: 1px solid #c6e9d7; border-radius: 12px; padding: 24px; margin-top: 24px; }
.dam-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.dam-form-full { grid-column: 1 / -1; }
.dam-form-field label { display: block; font-size: 0.88rem; font-weight: 600; color: #1A1A1A; margin-bottom: 6px; }
.dam-input { width: 100%; padding: 10px 14px; border: 1px solid #E0E7EA; border-radius: 8px; font-family: 'ABeeZee', sans-serif; font-size: 0.95rem; color: #1A1A1A; }
.dam-input:focus { border-color: #18604A; outline: none; box-shadow: 0 0 0 3px rgba(24,96,74,0.15); }

.dam-upload-zone { border: 2px dashed #c6e9d7; border-radius: 12px; padding: 24px; text-align: center; cursor: pointer; transition: border-color 0.2s; background: #fff; }
.dam-upload-zone:hover { border-color: #18604A; }
.dam-upload-zone.dam-dragover { border-color: #F59E0B; background: #fefce8; }
.dam-upload-prompt p { margin: 0 0 4px; color: #555; }
.dam-upload-hint { font-size: 0.82rem; color: #999; }

.dam-form-actions { display: flex; gap: 12px; }
.dam-form-msg { margin-top: 12px; font-size: 0.9rem; font-weight: 600; min-height: 20px; }
.dam-form-msg.success { color: #15803d; }
.dam-form-msg.error { color: #dc2626; }

/* Login/No Access */
.dam-login-prompt, .dam-no-access { text-align: center; padding: 48px 24px; background: #F0F7F2; border-radius: 12px; }
.dam-login-prompt a, .dam-no-access a { color: #18604A; text-decoration: underline; }

/* Responsive */
@media (max-width: 680px) {
    .dam-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dam-roi-grid { grid-template-columns: 1fr; }
    .dam-ab-grid { grid-template-columns: 1fr; }
    .dam-form-grid { grid-template-columns: 1fr; }
    .dam-ad-card { flex-direction: column; }
    .dam-ad-preview { width: 100%; }
    .dam-ad-actions { width: 100%; }
}
