/* Shared design system for this DARPAN client's pages (Index, PushData, and
   any future pages). Keeps the branded header and card/button look
   consistent without duplicating CSS per page - see Pages/Shared/_Header.cshtml
   for the header markup this styles. */

:root {
    --navy: #0a3d62;
    --navy-dark: #072a46;
    --accent: #f39c12;
    --bg: #f2f5f8;
    --card-bg: #ffffff;
    --text: #1f2d3d;
    --muted: #64748b;
    --border: #e2e8f0;
    --success: #1a7f37;
    --success-bg: #e9f7ee;
    --error: #b42318;
    --error-bg: #fdecea;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

/* ---------- Header ---------- */
header.topbar {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 32px;
    border-bottom: 4px solid var(--accent);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand.brand-darpan { flex-direction: row-reverse; text-align: right; }
.brand-icon {
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}
.brand-icon img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.brand-text strong { font-size: 18px; letter-spacing: 0.5px; }
.brand-text span { font-size: 11px; color: #cfe0f0; }

.app-title { text-align: center; flex: 1 1 auto; min-width: 0; }
.app-title h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.app-title .subtitle {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #cfe0f0;
}
.app-title .subtitle code {
    background: rgba(255,255,255,0.15);
    padding: 1px 6px;
    border-radius: 4px;
}

/* ---------- Layout ---------- */
main { max-width: 960px; margin: 0 auto; padding: 40px 24px 64px; }
.lede { text-align: center; margin-bottom: 32px; }
.lede h2 { margin: 0 0 6px; font-size: 22px; }
.lede p { margin: 0; color: var(--muted); }

footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: var(--muted);
    border-top: 1px solid var(--border);
}
footer strong { color: var(--text); }

/* ---------- Cards ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 22px;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
a.card:hover {
    box-shadow: 0 8px 20px rgba(10, 61, 98, 0.12);
    transform: translateY(-2px);
    border-color: var(--navy);
}
.card .card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #eaf2f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
}
.card h3 { margin: 0; font-size: 16px; }
.card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.card .tag {
    display: inline-block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--navy);
    background: #eaf2f9;
    border-radius: 999px;
    padding: 2px 10px;
    width: fit-content;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}
.btn:hover { background: var(--navy-dark); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- Result / message box ---------- */
.result-box {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    background: #f8fafc;
    border: 1px solid var(--border);
    color: var(--muted);
    max-height: 320px;
    overflow: auto;
}
.result-box.success { background: var(--success-bg); border-color: #bfe3cb; color: var(--success); }
.result-box.error { background: var(--error-bg); border-color: #f3c6c0; color: var(--error); }

/* ---------- Project table (YEIDA consolidated app's dashboard) ---------- */
.project-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.project-table th, .project-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.project-table th {
    background: #f8fafc;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}
.project-table tr:last-child td { border-bottom: none; }
.project-table .code {
    font-family: Consolas, monospace;
    background: #eaf2f9;
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--navy);
    font-size: 12px;
}
.project-table .actions a {
    margin-right: 16px;
    font-size: 12px;
    color: var(--navy);
    text-decoration: none;
    font-weight: 600;
}
.project-table .actions a:hover { text-decoration: underline; }
.table-wrap { overflow-x: auto; }

/* ---------- Loading spinner (shown on the push button while submitting) ---------- */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.45);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 2px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
