:root {
    --pophi-orange: #ff7b00;
    --pophi-orange-dark: #e86f00;
    --pophi-bg: #f3f3f3;
    --pophi-card-bg: #ffffff;
}

/* Base layout */
html, body { height: 100%; }
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: var(--pophi-bg);
    color: #111;
}

/* New universal page wrappers (use these in every page) */
.page {
    padding: 16px;
    display: flex;
    justify-content: center;
}

.wrapper, .container {
    width: 100%;
    max-width: 1100px;
}

/* Card container (wider default than the old 480px cap) */
.card {
    margin: 14px 0;
    padding: 18px;
    border-radius: 10px;
    background: var(--pophi-card-bg);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    width: 100%;
    max-width: none;
}

/* Headings / subtitles often reused */
h1 {
    margin: 0 0 8px;
    font-size: 22px;
}
h2 {
    margin: 0 0 10px;
    font-size: 18px;
}

/* Small helper text */
.muted { opacity: 0.75; }
.small { font-size: 12px; opacity: 0.75; }

/* Labels & form controls */
label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 13px;
}

select,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="tel"],
textarea,
button {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    box-sizing: border-box;
    font-size: 14px;
}

select,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="tel"],
textarea {
    border-radius: 6px;
    border: 1px solid #ccc;
    background: #fff;
}

textarea { min-height: 100px; resize: vertical; }

/* Buttons / links */
button,
.btn,
.btn-primary {
    display: inline-block;
    border: none;
    border-radius: 6px;
    background: var(--pophi-orange);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    padding: 10px 12px;
    text-decoration: none;
    line-height: 1.1;
}

button:hover,
.btn:hover,
.btn-primary:hover {
    background: var(--pophi-orange-dark);
}

.btn-secondary {
    background: #444;
}
.btn-secondary:hover {
    background: #222;
}

/* Message boxes */
.message {
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 6px;
    background: #e0f5e0;
    color: #0b5d0b;
    font-size: 13px;
}

.error {
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 6px;
    background: #fde6e6;
    color: #b00020;
    font-size: 13px;
}

hr { margin: 18px 0; border: 0; border-top: 1px solid rgba(0,0,0,0.12); }

/* Layout helpers */
.row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}
.row > * { flex: 1 1 220px; }
.row .grow { flex: 2 1 320px; }
.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* Grid cards (dashboard) */
.grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.tile {
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 12px;
    background: #fff;
}
.tile-title { font-weight: 800; }
.tile-sub { opacity: 0.8; font-size: 13px; margin-top: 3px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}
th, td {
    padding: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    vertical-align: top;
}
th { text-align: left; background: rgba(0,0,0,0.02); }
td.num, th.num { text-align: right; }

/* Responsive tweaks for small screens */
@media (max-width: 480px) {
    .page { padding: 10px; }
    .card { padding: 14px; }
    h1 { font-size: 20px; }
    table { min-width: 720px; }
}
