/* ============================================
   Mandu DApp — Flat UI Design System
   Vivid, high-contrast, no shadows, no gradients
   ============================================ */

:root {
    /* Flat UI Colors */
    --primary: #2ECC71;        /* Emerald */
    --primary-hover: #27AE60;  /* Nephritis */
    --secondary: #3498DB;      /* Peter River */
    --secondary-hover: #2980B9;/* Belize Hole */
    --accent: #F1C40F;         /* Sun Flower */
    --accent-hover: #F39C12;   /* Orange */
    --danger: #E74C3C;         /* Alizarin */
    --danger-hover: #C0392B;   /* Pomegranate */
    --warning: #E67E22;        /* Carrot */
    --warning-hover: #D35400;  /* Pumpkin */

    /* Backgrounds */
    --bg-page: #ECF0F1;        /* Clouds */
    --bg-surface: #FFFFFF;     /* White */
    --bg-surface-alt: #F8F9FA; /* Very light gray */

    /* Text */
    --text-dark: #2C3E50;      /* Wet Asphalt */
    --text-muted: #7F8C8D;     /* Asbestos */
    --text-light: #95A5A6;     /* Concrete */

    /* Borders */
    --border: #BDC3C7;         /* Silver */
    --border-light: #DFE6E9;

    /* Status */
    --emerald: #2ECC71;
    --rose: #E74C3C;

    /* Legacy alias */
    --primary-color: #2ECC71;
    --text-primary: #2C3E50;
    --text-secondary: #7F8C8D;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-page);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   HEADER — Flat White Navigation
   ============================================ */
header {
    width: 100%;
    padding: 0 40px;
    height: 56px;
    background-color: var(--bg-surface);
    border-bottom: 2px solid var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-dark);
    text-decoration: none;
    letter-spacing: -0.025em;
}

header nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 24px;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 6px;
    transition: background-color 0.2s, color 0.2s;
}

header nav a:hover {
    color: var(--text-dark);
    background-color: var(--bg-page);
}

/* ============================================
   LAYOUT
   ============================================ */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.container {
    width: 100%;
    max-width: 440px;
    background-color: var(--bg-surface);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
}

h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 32px;
}

/* ============================================
   BUTTONS — Flat, solid colors
   ============================================ */
.metamask-btn {
    background-color: var(--primary);
    color: #FFFFFF;
    border: none;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: filter 0.2s, transform 0.1s;
}

.metamask-btn:hover {
    filter: brightness(0.9);
}

.metamask-btn:active {
    transform: scale(0.98);
}

.metamask-btn.secondary {
    background-color: var(--border);
    color: var(--text-dark);
    margin-top: 12px;
}

.metamask-btn.secondary:hover {
    background-color: var(--text-light);
    color: #FFFFFF;
}

.metamask-btn:disabled {
    background-color: var(--border);
    color: var(--text-light);
    cursor: not-allowed;
}

/* ============================================
   INFO CARD — Clean bordered card
   ============================================ */
.info-card {
    margin-top: 24px;
    padding: 24px;
    background-color: var(--bg-surface-alt);
    border: 2px solid var(--border-light);
    border-radius: 8px;
    text-align: left;
    display: none;
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.info-value {
    font-size: 0.875rem;
    color: var(--text-dark);
    word-break: break-all;
    margin-bottom: 16px;
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-surface);
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.info-value:last-child {
    margin-bottom: 0;
}

/* ============================================
   STATUS MESSAGES
   ============================================ */
.status {
    margin-top: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status.success {
    color: var(--primary);
}

.status.error {
    color: var(--danger);
}

/* ============================================
   FOOTER — Flat with top accent border
   ============================================ */
footer {
    width: 100%;
    padding: 24px;
    background-color: var(--bg-surface);
    border-top: 2px solid var(--border-light);
    text-align: center;
    color: var(--text-light);
    font-size: 0.8rem;
    font-weight: 500;
}

/* ============================================
   ADMIN TABLE
   ============================================ */
.admin-container {
    max-width: 1000px;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 24px;
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

th {
    background-color: var(--secondary);
    color: #FFFFFF;
    font-size: 0.8125rem;
    font-weight: 700;
    text-align: left;
    padding: 14px 16px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

td {
    padding: 14px 16px;
    font-size: 0.875rem;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-light);
}

tr:nth-child(even) td {
    background-color: var(--bg-surface-alt);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #EBF5FB;
}

/* ============================================
   RESPONSIVE
   ============================================ */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 2px solid var(--border);
    border-radius: 8px;
    margin-top: 24px;
}

.table-responsive table {
    margin-top: 0;
    border: none;
}

@media (max-width: 768px) {
    header {
        padding: 0 20px;
    }

    .container {
        padding: 30px 20px;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 16px;
    }

    .admin-header button {
        width: 100%;
    }
}

