/* Agentia Chat - Admin Styles */

.agentia-wrap {
    max-width: 900px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ======================== Dashboard Header ======================== */
.agentia-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.agentia-dashboard-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.agentia-dashboard-brand h1 {
    font-size: 20px;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
}

.agentia-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

.agentia-status-dot.active { background: #22c55e; }
.agentia-status-dot.inactive { background: #f59e0b; }

.agentia-status-text {
    font-size: 13px;
    color: #64748b;
}

.agentia-dashboard-actions {
    display: flex;
    gap: 8px;
}

/* ======================== Action Buttons ======================== */
.agentia-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.agentia-action-btn.primary {
    background: #4F46E5;
    color: #fff;
}

.agentia-action-btn.primary:hover {
    background: #4338CA;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}

.agentia-action-btn.secondary {
    background: #f1f5f9;
    color: #475569;
}

.agentia-action-btn.secondary:hover {
    background: #e2e8f0;
}

.agentia-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ======================== Alert ======================== */
.agentia-alert {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.agentia-alert.warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.agentia-alert strong {
    color: #92400e;
    display: block;
    margin-bottom: 2px;
    font-size: 14px;
}

.agentia-alert p {
    color: #a16207;
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}

/* ======================== Stats Grid ======================== */
.agentia-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.agentia-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.agentia-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.agentia-stat-icon.blue { background: #eff6ff; color: #3b82f6; }
.agentia-stat-icon.purple { background: #f5f3ff; color: #8b5cf6; }
.agentia-stat-icon.green { background: #f0fdf4; color: #22c55e; }

.agentia-stat-info {
    display: flex;
    flex-direction: column;
}

.agentia-stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.agentia-stat-label {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 4px;
}

/* ======================== Cards ======================== */
.agentia-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.agentia-card-header {
    margin-bottom: 16px;
}

.agentia-card-header h2 {
    font-size: 16px;
    color: #1e293b;
    margin: 0;
}

/* ======================== Chart ======================== */
.agentia-chart-container {
    min-height: 160px;
}

.agentia-chart-loading {
    text-align: center;
    color: #94a3b8;
    padding: 40px 0;
    font-size: 14px;
}

.agentia-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 150px;
    padding-top: 10px;
}

.agentia-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.agentia-bar {
    width: 100%;
    background: linear-gradient(180deg, #4F46E5, #818CF8);
    border-radius: 3px 3px 0 0;
    min-height: 2px;
    transition: height 0.5s ease;
}

.agentia-bar-col:hover .agentia-bar {
    background: linear-gradient(180deg, #4338CA, #6366F1);
}

.agentia-bar-label {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 6px;
    height: 14px;
}

/* ======================== Table ======================== */
.agentia-table {
    width: 100%;
    border-collapse: collapse;
}

.agentia-table thead th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
}

.agentia-table tbody td {
    padding: 12px 14px;
    font-size: 14px;
    color: #475569;
    border-bottom: 1px solid #f8fafc;
}

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

.agentia-table tbody td strong {
    color: #1e293b;
}

.agentia-badge-count {
    display: inline-block;
    background: #eff6ff;
    color: #3b82f6;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
}

/* ======================== Login Page ======================== */
.agentia-header {
    text-align: center;
    padding: 30px 0 20px;
}

.agentia-logo {
    margin-bottom: 12px;
}

.agentia-header h1 {
    font-size: 26px;
    color: #1e293b;
    margin: 0 0 8px;
}

.agentia-header p {
    color: #64748b;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

.agentia-card h2 {
    font-size: 20px;
    color: #1e293b;
    margin: 0 0 6px;
}

.agentia-card > p {
    color: #64748b;
    font-size: 14px;
    margin: 0 0 20px;
    line-height: 1.5;
}

/* Forms */
.agentia-field {
    margin-bottom: 16px;
}

.agentia-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.agentia-field input,
.agentia-field select,
.agentia-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.agentia-field input:focus,
.agentia-field textarea:focus {
    outline: none;
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

.agentia-password-wrap {
    position: relative;
}

.agentia-password-wrap input {
    padding-right: 44px;
}

.agentia-eye-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

/* Buttons */
.agentia-btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.agentia-btn-primary {
    background: #4F46E5;
    color: #fff;
}

.agentia-btn-primary:hover {
    background: #4338CA;
}

.agentia-btn-lg {
    padding: 12px 28px;
    font-size: 15px;
}

/* Messages */
.agentia-msg {
    margin: 12px 0;
    padding: 0;
    font-size: 14px;
    border-radius: 8px;
    line-height: 1.5;
    display: none;
}

.agentia-msg.success,
.agentia-msg.error {
    display: block;
    padding: 10px 14px;
}

.agentia-msg.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.agentia-msg.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Switch view */
.agentia-switch-view {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.agentia-switch-view p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.agentia-switch-view a {
    color: #4F46E5;
    font-weight: 600;
    text-decoration: none;
}

.agentia-switch-view a:hover {
    text-decoration: underline;
}

/* Footer */
.agentia-footer-note {
    text-align: center;
    margin-top: 24px;
}

.agentia-footer-note p {
    font-size: 13px;
    color: #94a3b8;
}

/* ======================== Flow Selector ======================== */
.agentia-flow-select {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.2s;
}

.agentia-flow-select:focus {
    outline: none;
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

/* ======================== Responsive ======================== */
@media (max-width: 768px) {
    .agentia-stats-grid {
        grid-template-columns: 1fr;
    }
    .agentia-dashboard-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    .agentia-dashboard-actions {
        width: 100%;
        justify-content: center;
    }
    .agentia-table {
        font-size: 13px;
    }
}
