/* Dashboard Styling */

.dashboard-main {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
    background: var(--cream);
    overflow-x: hidden;
    max-width: 100%;
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-top-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
    margin-bottom: 20px;
}

.dashboard-top-grid .dashboard-card {
    margin-bottom: 0;
}

.dashboard-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 8px;
    font-family: var(--Unbounded);
    letter-spacing: -0.02em;
}

.dashboard-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
    border: 1px solid rgba(212, 160, 23, 0.10);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(212, 160, 23, 0.14);
    background: linear-gradient(135deg, rgba(212,160,23,0.10) 0%, rgba(240,197,58,0.06) 100%);
}

.card-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--charcoal);
    margin: 0;
    font-family: var(--Unbounded);
}

.card-body {
    padding: 24px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 24px;
    color: #ffffff;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-icon {
    font-size: 48px;
    margin-right: 20px;
    opacity: 0.9;
}

.stat-content h3 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 4px 0;
}

.stat-content p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

.usage-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.usage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #e0e0e0;
}

.usage-item:last-child {
    border-bottom: none;
}

.usage-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px 0;
}

.usage-info p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.usage-info a {
    color: #667eea;
    text-decoration: none;
}

.usage-info a:hover {
    text-decoration: underline;
}

.usage-date {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
}

.tool-stats {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tool-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.tool-stat-item:last-child {
    border-bottom: none;
}

.tool-name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.tool-count {
    font-size: 13px;
    color: #667eea;
    font-weight: 600;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-outline-primary {
    border: 2px solid #667eea;
    color: #667eea;
    background: transparent;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: #667eea;
    color: #ffffff;
}

/* Make dashboard CTAs match site theme */
.dashboard-card .btn.btn-warning,
.dashboard-card a.btn.btn-warning {
    background: linear-gradient(135deg, var(--yellow) 0%, #f4c430 100%) !important;
    color: var(--charcoal) !important;
    border: none !important;
    box-shadow: 0 10px 24px rgba(212, 160, 23, 0.25) !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
}
.dashboard-card .btn.btn-warning:hover,
.dashboard-card a.btn.btn-warning:hover {
    background: linear-gradient(135deg, #f4c430 0%, var(--yellow) 100%) !important;
}
.dashboard-card .btn.btn-outline-dark {
    border: 2px solid rgba(26, 26, 26, 0.25) !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
}

.btn-outline-secondary {
    border: 2px solid #999;
    color: #666;
    background: transparent;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background: #999;
    color: #ffffff;
}

/* Usage dashboard additions */
.usage-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.usage-pill {
    border: 1px solid rgba(212, 160, 23, 0.14);
    background: linear-gradient(180deg, #ffffff 0%, rgba(250, 247, 240, 0.70) 100%);
    border-radius: 12px;
    padding: 14px 14px;
    box-shadow: 0 2px 10px rgba(17, 24, 39, 0.06);
}

.usage-pill .k {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 6px 0;
}

.usage-pill .v {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.usage-subtitle-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid rgba(212, 160, 23, 0.18);
    background: rgba(250, 247, 240, 0.85);
    color: #111827;
    font-size: 13px;
    margin: 0 0 14px 0;
}

.usage-subtitle-pill .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--yellow);
}

.usage-subtitle-pill.free .dot { background: var(--yellow); }
.usage-subtitle-pill.paid .dot { background: var(--yellow-glow); }

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 18px;
}

.badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #111827;
    border: 1px solid #e5e7eb;
    font-size: 13px;
    line-height: 1;
}

.badge-chip.primary {
    background: rgba(212, 160, 23, 0.14);
    border-color: rgba(212, 160, 23, 0.26);
    color: #5a3d00;
}
.badge-chip.success {
    background: rgba(240, 197, 58, 0.18);
    border-color: rgba(240, 197, 58, 0.28);
    color: #5a3d00;
}
.badge-chip.neutral {
    background: rgba(107, 114, 128, 0.10);
    border-color: rgba(107, 114, 128, 0.18);
    color: #374151;
}

.usage-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 14px;
    overflow: hidden;
}

.usage-table th,
.usage-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.usage-table th {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #fafafa;
    position: sticky;
    top: 0;
    z-index: 2;
}

.usage-table tbody tr:hover {
    background: #fbfbff;
}

.usage-cell-title {
    font-weight: 700;
    color: #111827;
}

.usage-tool-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.usage-tool-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(212, 160, 23, 0.22);
    background: rgba(250, 247, 240, 0.85);
    color: #1a1a1a;
    text-decoration: none;
    flex: 0 0 auto;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.usage-tool-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(212, 160, 23, 0.16);
    background: #fff;
}

.usage-tool-link svg {
    width: 16px;
    height: 16px;
}

.usage-mini {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    font-size: 12px;
    color: #374151;
    white-space: nowrap;
}

.usage-mini.weekly { background: rgba(16, 185, 129, 0.10); border-color: rgba(16, 185, 129, 0.20); color: #065f46; }
.usage-mini.daily { background: rgba(99, 102, 241, 0.10); border-color: rgba(99, 102, 241, 0.20); color: #3730a3; }
.usage-mini.capped { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.22); color: #92400e; }

.usage-bar {
    width: 100%;
    max-width: 280px;
    height: 10px;
    background: rgba(26, 26, 26, 0.10);
    border-radius: 999px;
    overflow: hidden;
}

.usage-bar > span {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--yellow) 0%, var(--yellow-glow) 100%);
}

/* Slightly nicer hover + zebra */
.usage-table tbody tr:hover {
    background: rgba(212, 160, 23, 0.08);
}

.usage-bar-label {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
}

.usage-muted {
    color: #6b7280;
    font-size: 13px;
}

.usage-table td {
    color: #111827;
}
.usage-table tbody tr:nth-child(odd) {
    background: rgba(250, 247, 240, 0.45);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header h1 {
        font-size: 24px;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .stat-icon {
        margin-right: 0;
        margin-bottom: 12px;
    }

    .usage-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .usage-date {
        margin-top: 8px;
    }

    .usage-summary-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-top-grid {
        grid-template-columns: 1fr;
    }
}

