/* =========================
   GLOBAL CSS VARIABLES
   ========================= */
:root {
    /* Primary */
    --color-primary: #f6d57a;
    --color-primary-hover: #f1c85d;
    --color-primary-dark: #ecb83a;
    --color-primary-focus-ring: rgba(240, 195, 109, 0.2);
    --color-accent-bar: #f6d57a;
    /* Backgrounds */
    --color-page-bg: #f6dfb4;
    --color-card-bg: #ffffff;
    --color-input-bg: #fafafa;
    --color-input-bg-focus: #ffffff;
    /* Text */
    --color-text-dark: #1a1a1a;
    --color-text-medium: #444444;
    --color-text-muted: #888888;
    --color-text-placeholder: #bbbbbb;
    --color-btn-text: #3a2e00;
    /* Borders */
    --color-border-default: #e0e0e0;
    --color-border-focus: #f0c36d;
    --color-border-hover: #cccccc;
    /* Error / Validation */
    --color-error-bg: #fde2e2;
    --color-error-border: #f5c2c2;
    --color-error-text: #a94442;
    --color-validation-text: #d9534f;
    /* Links */
    --color-link: #c9952a;
    --color-link-hover: #a87820;
    /* Shadows */
    --shadow-card: 0 16px 48px rgba(0,0,0,0.13), 0 4px 12px rgba(0,0,0,0.07);
    --shadow-btn: 0 4px 14px rgba(241, 200, 93, 0.45);
    --shadow-btn-hover: 0 6px 18px rgba(241, 200, 93, 0.55);
    --shadow-btn-active: 0 2px 8px rgba(241, 200, 93, 0.35);
}

/* ??????????????????????????????????????????
   PAGE LAYOUT — shared across all pages
   ?????????????????????????????????????????? */

.pg-page {
}

.pg-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

@media (min-width: 768px) {
    .pg-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 16px;
    }
}

.pg-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin: 0 0 2px;
    letter-spacing: -0.3px;
}

@media (min-width: 768px) {
    .pg-title {
        font-size: 24px;
    }
}

.pg-subtitle {
    font-size: 12px;
    color: var(--color-text-muted);
    margin: 0;
}

.pg-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    height: 46px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    color: var(--color-btn-text);
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
}

    .pg-add-btn:active {
        transform: scale(0.98);
    }

@media (min-width: 768px) {
    .pg-add-btn {
        width: auto;
        height: 40px;
        padding: 0 18px;
        font-size: 13.5px;
        border-radius: 8px;
    }

        .pg-add-btn:hover {
            background: linear-gradient(135deg, var(--color-primary-hover), var(--color-primary-dark));
            box-shadow: var(--shadow-btn-hover);
            transform: translateY(-1px);
        }
}

.pg-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
    font-size: 14px;
}

/* Add these to your existing pg-header CSS (e.g. global.css or layout.css) */

/* Wraps all action buttons in the header */
/* Wraps all action buttons in the header */
.pg-header-actions {
    display: flex;
    flex-direction: column; /* stack on mobile */
    gap: 8px;
    width: 100%; /* full width on mobile */
}

@media (min-width: 768px) {
    .pg-header-actions {
        flex-direction: row;
        align-items: center;
        width: auto;
        justify-content: flex-end;
    }
}

/* Secondary / outline button */
.pg-secondary-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 46px;
    padding: 0 16px;
    background: transparent;
    border: 1.5px solid var(--color-border-hover);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: var(--color-text-medium);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

    .pg-secondary-btn:active {
        transform: scale(0.98);
    }

/* Reset standard links globally */
a {
    text-decoration: none;
    color: inherit;
}

    a.pg-add-btn:hover {
        color: var(--color-btn-text) !important;
        text-decoration: none;
    }

    a.pg-secondary-btn:hover {
        color: var(--color-text-dark) !important;
        text-decoration: none;
    }

@media (min-width: 768px) {
    .pg-secondary-btn {
        width: auto;
        height: 40px;
        padding: 0 16px;
        font-size: 13.5px;
        border-radius: 8px;
    }

        .pg-secondary-btn:hover {
            background: var(--color-input-bg);
            border-color: var(--color-text-medium);
            color: var(--color-text-dark);
        }
}
