/* ===== Custom Icon Styles & Visual Helpers ===== */

:root {
    --text-strong: #0f172a;
}

.card,
.card-body,
.card-header,
.table {
    color: var(--text-strong);
    background-color: #ffffff;
}

.form-label,
.section-title {
    background-color: transparent;
}

.card-glass {
    color: #f8fafc;
}

.muted {
    color: #475569;
}

.btn-ghost {
    color: var(--text-strong);
}

.form-control,
.form-select {
    color: #0f172a;
}

.form-control::placeholder {
    color: #475569;
    opacity: 1;
}

/* Mobile stacked tables (used across list views) */
@media (max-width: 768px) {
  .mobile-stack-table thead { display: none; }
  .mobile-stack-table tr {
    display: block;
    margin-bottom: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    padding: 10px;
    background: #ffffff;
  }
  html[data-theme="dark"] .mobile-stack-table tr {
    background: rgba(15, 33, 29, 0.72);
    border-color: rgba(217, 164, 65, 0.22);
  }
  .mobile-stack-table td {
    display: flex;
    justify-content: space-between;
    padding: 6px 4px;
    border: none;
  }
  .mobile-stack-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: rgba(15, 23, 42, 0.6);
  }
  html[data-theme="dark"] .mobile-stack-table td::before { color: rgba(203, 213, 225, 0.75); }
}

/* Status Icons */
.icon-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.icon-status.success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.icon-status.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.icon-status.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.icon-status.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

/* Metric Cards */
.metric-card {
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent), transparent);
}

.metric-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(34, 211, 238, 0.2);
    border-color: rgba(34, 211, 238, 0.4);
}

.metric-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--accent);
    margin: 12px 0;
    font-variant-numeric: tabular-nums;
}

.metric-label {
    color: #cbd5e1;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.metric-icon {
    font-size: 24px;
    color: var(--accent);
    opacity: 0.8;
}

/* Quick Actions */
.quick-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: #ffffff;
}

.quick-action:hover {
    background: var(--card-strong);
    border-color: var(--accent);
    transform: translateX(8px);
    box-shadow: 0 8px 24px rgba(34, 211, 238, 0.15);
    color: #ffffff;
}

.quick-action-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), #0ea5e9);
    border-radius: 12px;
    font-size: 24px;
    color: #0b1224;
    flex-shrink: 0;
}

.quick-action-content h4 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.quick-action-content p {
    margin: 0;
    font-size: 13px;
    color: #cbd5e1;
}

/* Timeline Component */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--stroke);
}

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

.timeline-marker {
    position: absolute;
    left: -28px;
    width: 24px;
    height: 24px;
    background: var(--accent);
    border: 4px solid var(--bg);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.2);
}

.timeline-content {
    animation: fadeInUp 0.6s ease-out;
}

.timeline-date {
    color: #cbd5e1;
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: 500;
}

.timeline-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #ffffff;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #cbd5e1;
}

.empty-state-icon {
    font-size: 64px;
    color: var(--stroke);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #e2e8f0;
}

.empty-state-text {
    font-size: 14px;
    margin-bottom: 24px;
    color: #cbd5e1;
}

/* Info Box */
.info-box {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-left: 4px solid #3b82f6;
    border-radius: 8px;
    margin-bottom: 20px;
}

.info-box-icon {
    font-size: 24px;
    color: #3b82f6;
    flex-shrink: 0;
}

.info-box.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    border-left-color: #f59e0b;
}

.info-box.warning .info-box-icon {
    color: #f59e0b;
}

.info-box.success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    border-left-color: #22c55e;
}

.info-box.success .info-box-icon {
    color: #22c55e;
}

.info-box.danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    border-left-color: #ef4444;
}

.info-box.danger .info-box-icon {
    color: #ef4444;
}

/* Stat Grid */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 28px rgba(34, 211, 238, 0.15);
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
}

.stat-label {
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 500;
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--card);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.feature-list li:hover {
    background: var(--card-strong);
    transform: translateX(8px);
}

.feature-list li::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--accent);
    color: #0b1224;
    border-radius: 50%;
    font-weight: bold;
    flex-shrink: 0;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.spinner-lg {
    width: 60px;
    height: 60px;
    border-width: 6px;
}

/* Tag Component */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(34, 211, 238, 0.15);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(34, 211, 238, 0.25);
    transform: scale(1.05);
}

.tag-success {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.tag-warning {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.tag-danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), #0ea5e9);
    color: #0b1224;
    font-weight: 700;
    font-size: 16px;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 24px;
}

/* Divider */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--stroke), transparent);
    margin: 32px 0;
}

.divider-text {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 32px 0;
    color: var(--muted);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.divider-text::before,
.divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--stroke), transparent);
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent), #0ea5e9);
    color: #0b1224;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 8px 24px rgba(34, 211, 238, 0.3);
}

.scroll-top.visible {
    opacity: 1;
    transform: scale(1);
}

.scroll-top:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(34, 211, 238, 0.5);
}
