/* ================================================
   PLANNING APPLICATIONS STYLES – CALM & CONSISTENT
   Matches rest of Hightae site (navy #003087, clean white)
   Last updated: 13 April 2026
   ================================================ */

html, body {
    background: #f8f9fa !important;
    min-height: 100vh;
}

/* Main content area – now perfectly centred with top gap */
.planning-page {
    margin: 0 auto;
    max-width: 1380px;
    width: 100%;
}

/* Clean centred title + subtitle (no blue banner) */
.page-header {
    text-align: center;
    margin: 40px 0 35px 0;
    padding: 0 20px;
}

.page-header h1 {
    font-size: 2.35rem;
    font-weight: 700;
    color: #003087;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.page-header h1 i {
    color: #f59e0b;
    font-size: 2.1rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #4b5563;
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Stats, search, cards – all inherit the centred container */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 48, 135, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 1.6rem;
    color: white;
    background: #003087;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.stat-content p {
    color: #4b5563;
    font-weight: 500;
    font-size: 0.95rem;
}

/* Search bar – icon now perfectly locked inside its own wrapper */
.search-section {
    margin-bottom: 30px;
}

.search-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 620px;
    margin: 0 auto;
    flex-wrap: nowrap;
}

/* NEW WRAPPER – this is what finally fixes the icon */
.search-field {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.search-field i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    z-index: 2;
    font-size: 1.1rem;
    pointer-events: none;
}

.search-field input {
    width: 100%;
    height: 52px;
    padding: 0 14px 0 50px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    line-height: 52px;
}

.search-field input:focus {
    border-color: #003087;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 48, 135, 0.15);
}

.search-btn {
    padding: 0 28px;
    height: 52px;
    background: #003087;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 52px;
}

.search-btn:hover {
    background: #00246b;
}

/* Clear button */
.clear-btn {
    padding: 0 20px;
    height: 52px;
    background: #e5e7eb;
    color: #374151;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 52px;
}

.clear-btn:hover {
    background: #d1d5db;
    color: #1f2937;
    transform: translateY(-1px);
}

.clear-btn i {
    font-size: 1.1rem;
}

/* Application cards (unchanged) */
.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.application-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f3f4f6;
}

.application-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0, 48, 135, 0.12);
}

.card-status-header,
.card-ref-number {
    padding: 18px 24px;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
}

.ref-number {
    font-weight: 700;
    color: #1f2937;
    font-size: 1.05rem;
}

.ref-number i {
    color: #003087;
}

/* Status badges */
.status-badge {
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.status-approved  { background: #10b981; color: white; }
.status-pending   { background: #f59e0b; color: white; }
.status-rejected  { background: #ef4444; color: white; }
.status-withdrawn { background: #6b7280; color: white; }
.status-default   { background: #003087; color: white; }

/* Card content */
.card-content {
    padding: 24px;
}

.application-type {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.application-type i {
    margin-right: 8px;
    color: #003087;
}

.description {
    color: #374151;
    line-height: 1.6;
    margin-bottom: 18px;
}

.dates-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.date-item {
    display: flex;
    align-items: center;
    color: #4b5563;
    font-size: 0.9rem;
}

.date-item i {
    margin-right: 8px;
    width: 16px;
    color: #9ca3af;
}

.card-footer {
    padding: 20px 24px;
    background: #f8f9fa;
    border-top: 1px solid #e5e7eb;
}

.view-details-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px;
    background: #003087;
    color: white;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.view-details-btn:hover {
    background: #00246b;
    transform: translateY(-2px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    margin-bottom: 30px;
}

.pagination-btn,
.pagination-number {
    padding: 10px 16px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    min-width: 42px;
    text-align: center;
}

.pagination-number.active,
.pagination-btn:hover,
.pagination-number:hover {
    background: #003087;
    color: white;
    border-color: #003087;
}

.footer-info {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    color: #4b5563;
    font-size: 0.95rem;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 768px) {
    .search-form {
        padding: 16px;
    }
    
    .search-input-group {
        max-width: 100%;
        gap: 8px;
    }
    
    .search-btn {
        padding: 0 22px;
        font-size: 0.95rem;
    }
    
    .clear-btn {
        padding: 0 16px;
        font-size: 0.95rem;
    }
    
    .page-header { padding: 30px 20px; }
    .page-header h1 { font-size: 2rem; }
    .applications-grid { grid-template-columns: 1fr; }
    .pagination { flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .search-input-group {
        flex-wrap: wrap;
    }
    
    .search-btn, 
    .clear-btn {
        flex: 1 1 auto;
        height: 48px;
        line-height: 48px;
    }
    
    .search-field input {
        height: 48px;
        line-height: 48px;
        padding: 0 14px 0 48px;
    }
}