/* =====================================================
   PRINTBUDDY EXPRESS — GLOBAL CSS FOUNDATION
   Shared across Student, Provider, and Staff roles
   ===================================================== */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Reset ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', 'Poppins', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

img, video { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c4b5d8; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #a78cc0; }

/* ─────────────────────────────────────────────────────
   SHARED UTILITY CLASSES
───────────────────────────────────────────────────── */

/* ── Container ── */
.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

.container-sm  { max-width: 720px; margin: auto; padding: 0 20px; }
.container-md  { max-width: 980px; margin: auto; padding: 0 20px; }
.container-lg  { max-width: 1280px; margin: auto; padding: 0 24px; }

/* ── Typography ── */
.text-xs    { font-size: 11px; }
.text-sm    { font-size: 13px; }
.text-base  { font-size: 15px; }
.text-lg    { font-size: 18px; }
.text-xl    { font-size: 22px; }
.text-2xl   { font-size: 28px; }
.text-muted { color: #6b7280; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold  { font-weight: 700; }

/* ── Spacing ── */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

/* ── Flex helpers ── */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.flex-wrap { flex-wrap: wrap; }

/* ── Grid helpers ── */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ── Status Badges (shared by all roles) ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.badge-pending      { background: #FEF3C7; color: #92400E; }
.badge-printing     { background: #DBEAFE; color: #1E40AF; }
.badge-completed    { background: #D1FAE5; color: #065F46; }
.badge-queue        { background: #EDE9FE; color: #5B21B6; }
.badge-pickup       { background: #E0F2FE; color: #0369A1; }
.badge-delivered    { background: #D1FAE5; color: #065F46; }
.badge-paid         { background: #D1FAE5; color: #065F46; }
.badge-unpaid       { background: #FEE2E2; color: #991B1B; }
.badge-verification { background: #FEF3C7; color: #92400E; }
.badge-delivery     { background: #E0F2FE; color: #0369A1; }
.badge-gray         { background: #F3F4F6; color: #374151; }

/* ── Shared Form Elements ── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: #4B5563;
    letter-spacing: 0.2px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1.5px solid #E5E7EB;
    background: #FAFAFA;
    font-size: 14px;
    color: #1F2937;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #8B5CF6;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #9CA3AF;
}

.form-textarea {
    resize: vertical;
    min-height: 90px;
}

/* ── Error / Success Messages ── */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
}
.alert-error   { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.alert-success { background: #F0FDF4; color: #15803D; border: 1px solid #BBF7D0; }
.alert-warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.alert-info    { background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }

/* ── Shared Table Styles ── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead {
    background: #F8FAFC;
}

.data-table th {
    padding: 13px 16px;
    text-align: left;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #6B7280;
    border-bottom: 1.5px solid #E5E7EB;
    white-space: nowrap;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #F3F4F6;
    vertical-align: top;
    color: #374151;
}

.data-table tbody tr:hover td {
    background: #FAFAFA;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ── Shared Card ── */
.card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    padding: 24px;
}

.card-sm { padding: 16px; border-radius: 12px; }
.card-lg { padding: 32px; border-radius: 20px; }

/* ── Shared Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-sm { padding: 7px 14px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { padding: 13px 28px; font-size: 15px; border-radius: 12px; }

/* ── Divider ── */
.divider {
    width: 100%;
    height: 1px;
    background: #E5E7EB;
    margin: 20px 0;
}

/* ── Section header ── */
.section-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}

.section-subtitle {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 24px;
}

/* ── Pagination ── */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    background: #fff;
    color: #374151;
    border: 1.5px solid #E5E7EB;
    transition: all 0.2s;
}

.page-btn:hover { border-color: #9CA3AF; }

/* ── Responsive Helpers ── */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .container, .container-sm, .container-md, .container-lg {
        padding-left: 16px;
        padding-right: 16px;
    }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .hide-mobile { display: none !important; }
}

@media (max-width: 480px) {
    .hide-xs { display: none !important; }
}
