/**
 * PTA Device Registration System
 * Premium Modern UI Styles
 */

/* ============================================
   CSS Variables & Design System
   ============================================ */
:root {
    /* Brand Colors */
    --pta-green: #4CAF50;
    --pta-green-light: #81C784;
    --pta-green-dark: #388E3C;
    --pta-green-gradient: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);

    /* UI Colors */
    --primary: #4CAF50;
    --primary-hover: #43A047;
    --secondary: #37474F;
    --accent: #00BCD4;

    /* Background Colors */
    --bg-dark: #263238;
    --bg-darker: #1C2428;
    --bg-darkest: #141A1D;
    --bg-light: #F5F7F9;
    --bg-white: #FFFFFF;
    --bg-card: #FFFFFF;

    /* Text Colors */
    --text-dark: #1A1A2E;
    --text-medium: #546E7A;
    --text-light: #90A4AE;
    --text-white: #FFFFFF;
    --text-muted: #78909C;

    /* Status Colors */
    --success: #4CAF50;
    --warning: #FFC107;
    --danger: #F44336;
    --info: #2196F3;

    /* Borders & Shadows */
    --border-light: #E0E0E0;
    --border-medium: #BDBDBD;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;

    /* Typography */
    --font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background: #f8f9fa;
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

/* Mobile-first: compact spacing */
body {
    font-size: 14px;
}

/* Desktop: larger text */
@media (min-width: 768px) {
    body {
        font-size: 16px;
    }
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

/* ============================================
   Typography
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-dark);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: var(--spacing-md);
}

.text-primary {
    color: var(--primary);
}

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-danger {
    color: var(--danger);
}

.text-muted {
    color: var(--text-muted);
}

.text-center {
    text-align: center;
}

/* ============================================
   Header Styles - Government PTA Mobile-First Design
   ============================================ */
.header {
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    background: #ffffff;
    padding: 8px 0;
    border-bottom: 2px solid #e0e0e0;
}

.header-row {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-column {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-logo {
    display: inline-flex;
    align-items: center;
}

/* Mobile: Smaller logos */
.header-logo img {
    height: 35px;
    width: auto;
}

/* Tablet & Desktop: Larger logos */
@media (min-width: 768px) {
    .header-logo img {
        height: 50px;
    }
}

.logo-text {
    display: none;
    /* Hidden on mobile */
}

/* Show text on larger screens */
@media (min-width: 768px) {
    .logo-text {
        display: inline-flex;
        align-items: center;
    }

    .header-column {
        gap: 12px;
    }
}

.logo-text h1 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
}

@media (min-width: 992px) {
    .logo-text h1 {
        font-size: 1.1rem;
    }
}

.logo-text h1 a {
    color: #1a1a1a;
    transition: color 0.2s;
}

.logo-text h1 a:hover {
    color: #4CAF50;
}

.dirbs-logo {
    display: inline-flex;
    align-items: center;
}

/* Mobile: Smaller DIRBS logo */
.dirbs-logo img {
    height: 32px;
    width: auto;
}

/* Tablet & Desktop: Larger DIRBS logo */
@media (min-width: 768px) {
    .dirbs-logo img {
        height: 45px;
    }
}

.header-banner {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    padding: 10px 0;
    position: relative;
    overflow: hidden;
}

/* Mobile: Smaller banner padding */
@media (min-width: 768px) {
    .header-banner {
        padding: 16px 0;
    }

    .header-container {
        padding: 12px 0;
    }

    .header-row {
        padding: 0 24px;
    }
}

.header-banner-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 12px;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .header-banner-inner {
        padding: 0 24px;
    }
}

.header-banner h1 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

@media (min-width: 768px) {
    .header-banner h1 {
        font-size: 1.5rem;
    }
}

/* ============================================
   Main Content Area - Mobile First
   ============================================ */
.main-content {
    flex: 1;
    max-width: 100%;
    margin: 0 auto;
    padding: 16px 12px;
    width: 100%;
}

@media (min-width: 768px) {
    .main-content {
        padding: 32px 24px;
        max-width: 1400px;
    }
}

.container {
    max-width: 100%;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .container {
        max-width: 1200px;
    }
}

/* ============================================
   Card Styles - Mobile First Compact
   ============================================ */
.card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 16px;
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.card-header {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    color: #ffffff;
    padding: 12px 16px;
}

@media (min-width: 768px) {
    .card-header {
        padding: 16px 24px;
    }
}

.card-header h2 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

@media (min-width: 768px) {
    .card-header h2 {
        font-size: 1.25rem;
    }
}

.card-header h2 i {
    font-size: 1.2rem;
}

@media (min-width: 768px) {
    .card-header h2 i {
        font-size: 1.5rem;
    }
}

.card-body {
    padding: 16px;
}

@media (min-width: 768px) {
    .card-body {
        padding: 24px 32px;
    }
}

.card-footer {
    padding: 12px 16px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

@media (min-width: 768px) {
    .card-footer {
        padding: 16px 24px;
    }
}

/* ============================================
   Form Styles - Mobile First with Touch Targets
   ============================================ */
.form-group {
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .form-group {
        margin-bottom: 24px;
    }
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #1a1a1a;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .form-label {
        font-size: 0.875rem;
        margin-bottom: 8px;
    }
}

.form-label .required {
    color: #F44336;
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    /* Prevents zoom on mobile */
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #ffffff;
}

@media (min-width: 768px) {
    .form-control {
        padding: 14px 16px;
        font-size: 1rem;
    }
}

.form-control:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
    outline: none;
}

.form-control::placeholder {
    color: #9e9e9e;
}

.form-control.error {
    border-color: #F44336;
}

.form-control.success {
    border-color: #4CAF50;
}

.form-hint {
    font-size: 0.8rem;
    color: #757575;
    margin-top: 4px;
}

.form-error {
    font-size: 0.8rem;
    color: #F44336;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

/* Select Styles */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23757575' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* Checkbox & Radio - Mobile Friendly */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 8px 0;
}

.form-check-input {
    width: 22px;
    height: 22px;
    margin-top: 2px;
    accent-color: #4CAF50;
    cursor: pointer;
}

.form-check-label {
    font-size: 0.9rem;
    color: #424242;
    cursor: pointer;
}

/* ============================================
   Button Styles - Mobile First with Touch Targets
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    min-height: 48px;
    /* Mobile touch target */
}

@media (min-width: 768px) {
    .btn {
        padding: 12px 32px;
        font-size: 1rem;
        min-height: auto;
    }
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

@media (min-width: 768px) {
    .btn-primary:hover:not(:disabled) {
        transform: translateY(-2px);
    }
}

.btn-secondary {
    background: #37474F;
    color: #ffffff;
}

.btn-secondary:hover:not(:disabled) {
    background: #455A64;
}

.btn-outline {
    background: transparent;
    border: 2px solid #4CAF50;
    color: #4CAF50;
}

.btn-outline:hover:not(:disabled) {
    background: #4CAF50;
    color: #ffffff;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    min-height: 52px;
}

@media (min-width: 768px) {
    .btn-lg {
        padding: 16px 48px;
        font-size: 1.125rem;
    }
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-full);
}

/* ============================================
   Device Card Styles
   ============================================ */
.device-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-light);
    transition: border-color var(--transition-fast);
}

.device-card.selected {
    border-color: var(--primary);
    background: rgba(76, 175, 80, 0.05);
}

.device-image {
    width: 120px;
    height: 160px;
    object-fit: contain;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
}

.device-info h3 {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-sm);
}

.device-info .brand {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.device-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    font-size: 0.875rem;
}

.device-specs .spec-item {
    display: flex;
    gap: var(--spacing-xs);
}

.device-specs .spec-label {
    color: var(--text-muted);
}

.device-specs .spec-value {
    font-weight: 500;
}

.device-price {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-light);
}

.device-price .price-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.device-price .price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

@media (max-width: 480px) {
    .device-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .device-image {
        margin: 0 auto;
    }

    .device-specs {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Autocomplete Styles
   ============================================ */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 2px solid var(--primary);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--shadow-lg);
    display: none;
}

.autocomplete-list.show {
    display: block;
}

.autocomplete-item {
    padding: var(--spacing-md);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background: rgba(76, 175, 80, 0.1);
}

.autocomplete-item .device-name {
    font-weight: 500;
}

.autocomplete-item .device-price {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
    margin: 0;
    padding: 0;
    border: none;
}

/* ============================================
   Steps Indicator - Mobile First
   ============================================ */
.steps {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 8px;
}

@media (min-width: 768px) {
    .steps {
        margin-bottom: 32px;
        gap: 0;
    }
}

.step {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    position: relative;
}

@media (min-width: 768px) {
    .step {
        gap: 8px;
        padding: 12px 16px;
    }
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -20px;
    width: 40px;
    height: 2px;
    background: #e0e0e0;
    display: none;
}

@media (min-width: 768px) {
    .step:not(:last-child)::after {
        display: block;
        right: -30px;
        width: 60px;
    }
}

.step.completed::after {
    background: #4CAF50;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #757575;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

@media (min-width: 768px) {
    .step-number {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

.step.active .step-number {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    color: #ffffff;
}

.step.completed .step-number {
    background: #4CAF50;
    color: #ffffff;
}

.step-label {
    font-size: 0.8rem;
    color: #757575;
    font-weight: 500;
    display: none;
}

@media (min-width: 768px) {
    .step-label {
        display: block;
        font-size: 0.875rem;
    }
}

.step.active .step-label {
    color: #1a1a1a;
}

/* ============================================
   Tracking Status Styles
   ============================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.pending {
    background: rgba(255, 193, 7, 0.15);
    color: #F57C00;
}

.status-badge.submitted {
    background: rgba(33, 150, 243, 0.15);
    color: var(--info);
}

.status-badge.verified {
    background: rgba(76, 175, 80, 0.15);
    color: var(--success);
}

.status-badge.rejected {
    background: rgba(244, 67, 54, 0.15);
    color: var(--danger);
}

.tracking-details {
    display: grid;
    gap: var(--spacing-lg);
}

.tracking-section {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
}

.tracking-section h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-light);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px dashed var(--border-light);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.detail-value {
    font-weight: 500;
    text-align: right;
}

/* ============================================
   Payment Page Styles
   ============================================ */
.payment-timer {
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5A5A 100%);
    color: var(--text-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.payment-timer h3 {
    color: var(--text-white);
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: var(--spacing-sm);
}

.payment-timer .countdown {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.payment-timer .countdown.warning {
    animation: pulse 1s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.qr-container {
    text-align: center;
    padding: var(--spacing-xl);
    background: var(--bg-light);
    border-radius: var(--radius-lg);
}

.qr-code {
    width: 200px;
    height: 200px;
    margin: 0 auto var(--spacing-lg);
    border: 4px solid var(--primary);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
    background: var(--bg-white);
}

.qr-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.banks-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.bank-item {
    padding: var(--spacing-md);
    background: var(--bg-white);
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 0.875rem;
    border: 1px solid var(--border-light);
}

/* ============================================
   Footer Styles
   ============================================ */
.footer {
    background: var(--bg-dark);
    color: var(--text-white);
    margin-top: auto;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background: url('../images/world-map.png') center/cover no-repeat; */
    background: var(--pta-green-gradient);
    opacity: 0.1;
    opacity: 0.1;
    pointer-events: none;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-2xl) var(--spacing-lg);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-2xl);
    position: relative;
    z-index: 1;
}

.footer-section h4 {
    color: var(--text-white);
    font-size: 1rem;
    margin-bottom: var(--spacing-lg);
    font-weight: 600;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.footer-logo img {
    height: 40px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
    color: var(--text-light);
}

.footer-contact a {
    color: var(--text-light);
}

.footer-contact a:hover {
    color: var(--primary);
}

.footer-contact i {
    width: 20px;
    color: var(--primary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-links a {
    color: var(--text-light);
    font-size: 0.875rem;
    transition: color var(--transition-fast), padding-left var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: var(--spacing-sm);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-lg);
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

.footer-bottom-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-bottom a {
    color: var(--text-light);
    margin-left: var(--spacing-md);
}

.footer-bottom a:hover {
    color: var(--primary);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-logo {
        justify-content: center;
    }

    .footer-contact {
        align-items: center;
    }

    .footer-links {
        align-items: center;
    }

    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gap-sm {
    gap: var(--spacing-sm);
}

.gap-md {
    gap: var(--spacing-md);
}

.gap-lg {
    gap: var(--spacing-lg);
}

.mt-md {
    margin-top: var(--spacing-md);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mt-xl {
    margin-top: var(--spacing-xl);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

.mb-xl {
    margin-bottom: var(--spacing-xl);
}

/* ============================================
   Loading & Animations
   ============================================ */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--text-white);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Alert & Message Styles
   ============================================ */
.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.alert-success {
    background: rgba(76, 175, 80, 0.15);
    color: var(--success);
    border: 1px solid var(--success);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.15);
    color: #F57C00;
    border: 1px solid var(--warning);
}

.alert-danger {
    background: rgba(244, 67, 54, 0.15);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.alert-info {
    background: rgba(33, 150, 243, 0.15);
    color: var(--info);
    border: 1px solid var(--info);
}

/* ============================================
   Modal Styles
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: var(--spacing-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.25rem;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.modal-close:hover {
    background: var(--border-light);
}

.modal-body {
    padding: var(--spacing-xl);
}

.modal-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .main-content {
        padding: var(--spacing-xl) var(--spacing-md);
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .header-logo-text {
        font-size: 1rem;
    }

    .header-links {
        display: none;
    }

    .header-banner h1 {
        font-size: 1.25rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .card-body {
        padding: var(--spacing-lg);
    }

    .btn-lg {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .header-logo img {
        height: 40px;
    }

    .main-content {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .card-body {
        padding: var(--spacing-md);
    }
}