/* Grant Guard Mobile-Optimized CSS */
/* Optimized Typography for Cellphone Screens */

/* Enhanced Mobile Typography */
:root {
    /* Professional color scheme with improved contrast */
    --primary-green: #1e3a21;
    --accent-blue: #0d7377;
    --secondary-gray: #495057;
    --light-gray: #f8f9fa;
    --text-dark: #1a202c;
    --text-medium: #2d3748;
    --text-light: #4a5568;
    
    /* Mobile-optimized spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    
    /* Mobile touch targets */
    --touch-target: 44px;
    --touch-target-lg: 56px;
}

/* Professional Mobile Typography System */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px; /* Base size for proper mobile scaling */
    line-height: 1.5;
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Mobile-First Container */
.container {
    max-width: 428px; /* iPhone 14 Pro Max width */
    margin: 0 auto;
    padding: var(--space-md);
}

/* Enhanced Header Typography */
.header h1 {
    font-size: 1.75rem; /* 28px */
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-sm);
}

.header p {
    font-size: 0.95rem; /* 15.2px */
    font-weight: 400;
    line-height: 1.4;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Professional Card Typography */
.card h3 {
    font-size: 1.125rem; /* 18px */
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: #1a202c !important;
    margin-bottom: var(--space-sm);
}

.card h4 {
    font-size: 1rem; /* 16px */
    font-weight: 600;
    line-height: 1.3;
    color: #2d3748 !important;
    margin-bottom: var(--space-xs);
}

.card p {
    font-size: 0.875rem; /* 14px */
    font-weight: 400;
    line-height: 1.5;
    color: #4a5568 !important;
    margin-bottom: var(--space-sm);
}

/* Optimized Button Styling */
.btn {
    min-height: var(--touch-target);
    padding: 12px var(--space-md);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    border-radius: 12px;
    border: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

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

/* Professional Icon Styling with fallback */
.btn i,
.card i,
.header i {
    font-size: 1.1em;
    font-weight: 400;
    display: inline-block;
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 5 Free", "Font Awesome 5 Pro", "FontAwesome", sans-serif;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

/* Fallback for missing icons */
.fas, .far, .fab, .fa {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 5 Free", "Font Awesome 5 Pro", "FontAwesome", sans-serif !important;
}

/* Simple fallback text for critical icons if all else fails */
.fas::before, .far::before, .fab::before, .fa::before {
    font-weight: 900;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

/* Enhanced Mobile Navigation */
.mobile-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.action-btn {
    min-height: var(--touch-target-lg);
    padding: var(--space-sm);
    background: #ffffff;
    color: #2563eb !important;
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.75rem; /* 12px */
    font-weight: 600;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #e0e7ff;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.action-btn:hover,
.action-btn:focus {
    background: #f0f4ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.2);
    color: #1d4ed8 !important;
    text-decoration: none;
    border-color: #c7d2fe;
}

.action-btn:active {
    transform: scale(0.96);
}

.action-btn i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

/* Professional Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-active {
    background: rgba(34, 197, 94, 0.1);
    color: #059669;
}

.status-trial {
    background: rgba(251, 191, 36, 0.1);
    color: #d97706;
}

.status-expired {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Enhanced Form Controls */
.form-control,
.form-select {
    min-height: var(--touch-target);
    padding: 12px var(--space-md);
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
    outline: none;
}

/* Professional Alert Styling */
.alert {
    padding: var(--space-md);
    border-radius: 12px;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: var(--space-md);
}

.alert i {
    margin-right: var(--space-sm);
    font-size: 1rem;
}

/* Improved Grid Cards */
.top-overview-cards,
.bottom-overview-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

/* Professional Badge Styling */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Enhanced Loading States */
.loading {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(44, 85, 48, 0.2);
    border-top: 2px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Professional Notification Styling */
.notification {
    position: fixed;
    top: var(--space-md);
    left: var(--space-md);
    right: var(--space-md);
    z-index: 1000;
    padding: var(--space-md);
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    transform: translateY(-100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* Enhanced Modal Styling */
.modal {
    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: 1000;
    padding: var(--space-md);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    padding: var(--space-lg) var(--space-lg) var(--space-md);
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-dark);
}

.modal-body {
    padding: var(--space-lg);
    max-height: 60vh;
    overflow-y: auto;
}

/* Professional Input Groups */
.input-group {
    position: relative;
    margin-bottom: var(--space-md);
}

.input-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-medium);
    margin-bottom: var(--space-xs);
    display: block;
}

/* Enhanced Table Styling */
.table {
    width: 100%;
    font-size: 0.875rem;
    border-collapse: collapse;
}

.table th {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-medium);
    border-bottom: 2px solid #e5e7eb;
}

.table td {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid #f3f4f6;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 375px) {
    .container {
        padding: var(--space-sm);
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .mobile-nav {
        gap: var(--space-xs);
    }
    
    .action-btn {
        font-size: 0.7rem;
        padding: var(--space-xs);
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 10px var(--space-sm);
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn,
    .form-control,
    .card {
        border-width: 2px;
    }
}

/* Dark mode preparation */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #f8f9fa;
        --text-medium: #e9ecef;
        --light-gray: #343a40;
    }
}