@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body { 
    font-family: 'Inter', system-ui, -apple-system, sans-serif; 
    margin: 0; 
    padding: 0; 
    background: #f8fafc; 
    color: #334155; 
    line-height: 1.6;
}

/* ========================================= */
/* MODERN TABLES & TYPOGRAPHY (WebOS Fixes)  */
/* ========================================= */
.table-responsive { 
    width: 100% !important; 
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; 
    border-radius: 12px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); 
    background: #fff; 
    border: 1px solid #e2e8f0; 
    margin-bottom: 30px; 
    box-sizing: border-box;
    display: block;
}
.admin-table, .portal-table { 
    width: 100% !important; 
    min-width: 600px; 
    border-collapse: collapse; 
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 13px;
}
.admin-table th, .portal-table th { 
    background: #f8fafc; 
    padding: 6px 10px; 
    text-align: left; 
    font-weight: 600; 
    color: #475569; 
    font-size: 13px; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    border-bottom: 2px solid #e2e8f0; 
    white-space: nowrap;
}
.admin-table td, .portal-table td { 
    padding: 6px 10px; 
    border-bottom: 1px solid #f1f5f9; 
    color: #334155; 
    vertical-align: middle; 
    font-size: 13px;
}
.admin-table td small, .portal-table td small { font-weight: 400; color: #64748b; }
.admin-table tr:hover, .portal-table tr:hover { background: #fcfcfd; }

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 20px; 
}
.navbar { 
    background: rgba(255, 255, 255, 0.80); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0; 
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    height: 60px;
}
.nav-links {
    display: flex;
    align-items: center;
    flex: 1;
    height: 100%;
}
.nav-main-links { display: flex; align-items: center; justify-content: center; flex: 1; }
.nav-utilities { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.nav-utilities a { margin: 0; }
.nav-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.nav-logo img {
    height: 35px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}
.nav-logo:hover img { transform: scale(1.03); }
.navbar a { 
    color: #4b5563; 
    text-decoration: none; 
    margin: 0 15px; 
    font-weight: 500; 
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    position: relative;
    height: 100%;
}
.navbar a:not(.nav-cta)::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -4px; left: 50%; transform: translateX(-50%); background-color: #cca959; transition: width 0.3s ease; }
.navbar a:not(.nav-cta):hover { color: #020b42; }
.navbar a:not(.nav-cta):hover::after { width: 100%; }
.navbar a.nav-cta { background: #020b42; color: #fff !important; border-radius: 6px; padding: 8px 18px; margin-left: 15px; height: auto; transition: opacity 0.3s ease; }
.navbar a.nav-cta:hover { opacity: 0.85; }
.nav-logo::after, .nav-bell a::after { display: none; }
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
}
.lang-switcher a {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}
.lang-switcher a.active {
    color: #cca959;
    font-weight: 700;
}
.lang-switcher .separator {
    color: #cbd5e1;
    font-size: 0.9em;
}

/* Navbar Dropdown */
.nav-dropdown { position: relative; display: inline-block; }
.nav-dropdown-content { display: none; position: absolute; background-color: #fff; min-width: 220px; box-shadow: 0px 10px 25px 0px rgba(0,0,0,0.1); z-index: 101; border-radius: 8px; top: 100%; left: 0; overflow: hidden; border: 1px solid #e2e8f0; }
.nav-dropdown-content a { color: #4b5563; padding: 12px 20px; text-decoration: none; display: block; margin: 0; border-bottom: 1px solid #f1f5f9; font-size: 0.95em; }
.nav-dropdown-content a:last-child { border-bottom: none; }
.nav-dropdown-content a:hover { background-color: #f8fafc; color: #cca959; padding-left: 25px; }
.nav-dropdown-content a::after { display: none; }
.nav-dropdown:hover .nav-dropdown-content { display: block; }

header { 
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); 
    color: #020b42; 
    padding: 60px 20px 80px; 
    text-align: center;
    border-bottom: 1px solid #f3f4f6;
}
header h1 { 
    margin: 0 0 15px; 
    font-size: 3em; 
    font-weight: 700;
    letter-spacing: -0.02em;
}
header p { 
    margin: 0; 
    font-size: 1.25em; 
    color: #4b5563; 
    max-width: 600px;
    margin: 0 auto;
}
.btn-hero {
    margin-top: 35px;
    font-size: 1.15em;
    padding: 15px 35px;
}
.services-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 30px; 
    margin-top: 40px; 
}
.service-card { 
    background: #ffffff; 
    padding: 30px; 
    border-radius: 16px; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03); 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #f3f4f6;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}
.service-card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 25px 50px -12px rgba(2, 11, 66, 0.12);
}
.service-card img {
    transition: transform 0.5s ease;
}
.service-card:hover img {
    transform: scale(1.03);
}
.service-card h3 { 
    margin-top: 0; 
    color: #212b46; 
    font-size: 1.25em;
    min-height: 2.8em;
    line-height: 1.4;
}
.service-card p {
    color: #4b5563; 
}
.service-card-desc {
    flex-grow: 1;
    margin-bottom: 20px;
}
.price { 
    font-weight: 700; 
    color: #cca959; 
    margin: 0 0 15px 0;
    font-size: 1.1em;
}
.btn { 
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px; 
    background: #212b46; 
    color: #ffffff; 
    text-decoration: none; 
    border-radius: 4px; 
    font-weight: 500; 
    font-size: 13px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    cursor: pointer;
    text-align: center;
}
.btn:hover { 
    background: #2e3d60; 
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 43, 70, 0.2);
}
.btn-secondary {
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px; 
    background: #f3f4f6; 
    color: #374151; 
    text-decoration: none; 
    border-radius: 4px; 
    font-weight: 500; 
    font-size: 13px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-left: 10px;
}
.btn-secondary:hover {
    background: #e5e7eb;
    color: #212b46;
    transform: translateY(-2px);
}
.single-view { 
    background: #ffffff; 
    padding: 50px; 
    border-radius: 16px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); 
    margin-top: 40px; 
}
.single-view h2 {
    margin-top: 0;
    font-size: 2em;
    color: #212b46;
}
.testimonial { 
    background: #f8fafc; 
    padding: 25px; 
    border: 1px solid #e2e8f0;
    border-left: 4px solid #212b46; 
    font-style: italic; 
    margin-top: 30px; 
    border-radius: 0 8px 8px 0;
    color: #4b5563;
}
/* Elements for detailed views */
.tech-tag {
    display: inline-block;
    background: #f1f5f9;
    color: #212b46;
    border: 1px solid #e2e8f0;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    margin-right: 8px;
    margin-bottom: 8px;
}
.meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
    color: #6b7280;
    font-size: 0.95em;
}
.meta-info strong {
    color: #020b42;
}
.features-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}
.features-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
}
.features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #ffffff;
    font-weight: bold;
    background: #212b46;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
    top: 3px;
}
/* Footer Enterprise */
.site-footer { background: #020b42; color: rgba(255,255,255,0.8); padding: 70px 20px 20px; margin-top: 80px; font-size: 14px; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; }
.footer-col h3 { color: #ffffff; margin-top: 0; margin-bottom: 25px; font-size: 1.2em; font-weight: 600; }
.footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-col li { margin-bottom: 15px; display: flex; align-items: flex-start; gap: 10px; }
.footer-col p { line-height: 1.6; margin-bottom: 15px; color: rgba(255,255,255,0.8); }
.footer-col a { color: rgba(255,255,255,0.8); text-decoration: none; transition: color 0.2s, opacity 0.2s; display: inline-flex; align-items: center; gap: 8px; }
.footer-col a:hover { color: #ffffff; opacity: 1; }
.footer-bottom { max-width: 1200px; margin: 50px auto 0; padding-top: 25px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; text-align: left; }
.footer-socials { display: flex; gap: 15px; }
.footer-socials a { color: rgba(255,255,255,0.8); font-size: 1.4em; transition: color 0.3s; margin: 0; }
.footer-socials a:hover { color: #cca959; }

/* UI Refactor: Compact Elements */
.btn-sm { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 4px 8px !important; font-size: 12px !important; border-radius: 4px !important; font-weight: 500; text-decoration: none; cursor: pointer; border: none; transition: all 0.2s; }
.btn-sm:hover { filter: brightness(0.9); }

.admin-content, .portal-content { font-size: 14px; }

/* Pastel Badges */
.badge { padding: 4px 8px !important; font-size: 11px !important; font-weight: 600 !important; border-radius: 12px !important; letter-spacing: 0.3px; display: inline-block; line-height: 1; white-space: nowrap; }
.badge-success { background: #d1fae5 !important; color: #065f46 !important; border: 1px solid #a7f3d0 !important; }
.badge-secondary { background: #f1f5f9 !important; color: #475569 !important; border: 1px solid #e2e8f0 !important; }
.badge-danger { background: #fee2e2 !important; color: #991b1b !important; border: 1px solid #fecaca !important; }
.badge-pending { background: #fef3c7 !important; color: #92400e !important; border: 1px solid #fde68a !important; }
.badge-active { background: #e0e7ff !important; color: #3730a3 !important; border: 1px solid #c7d2fe !important; }

/* Square Icon Buttons in Tables & Cards */
.admin-table td .btn-sm:has(> i:only-child),
.portal-table td .btn-sm:has(> i:only-child),
.req-card .btn-sm:has(> i:only-child),
.service-card .btn-sm:has(> i:only-child) {
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Compact Table Inputs & Selects */
.admin-table td select, .portal-table td select,
.admin-table td input, .portal-table td input,
.req-card select, .req-card input {
    height: 24px !important;
    padding: 0 6px !important;
    font-size: 12px !important;
}
.admin-table td form .btn-sm:not(:has(> i:only-child)),
.portal-table td form .btn-sm:not(:has(> i:only-child)),
.req-card form .btn-sm:not(:has(> i:only-child)) {
    height: 24px !important;
    padding: 0 8px !important;
    font-size: 12px !important;
}

/* Modal / Form Styles */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(17, 24, 39, 0.6); backdrop-filter: blur(4px); align-items: center; justify-content: center; }
.modal.active { display: flex; }
.modal-content { background-color: #fff; padding: 30px; border-radius: 12px; width: 100%; max-width: 420px; position: relative; box-shadow: 0 4px 12px rgba(0,0,0,0.05); animation: modalFadeIn 0.3s ease; }
@keyframes modalFadeIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
.modal-close { position: absolute; right: 25px; top: 25px; font-size: 28px; color: #9ca3af; cursor: pointer; line-height: 1; }
.modal-close:hover { color: #111827; }
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; color: #334155; font-size: 0.95em; }
.form-group input, .form-group select { width: 100%; padding: 12px; border: 1px solid #d1d5db; border-radius: 8px; box-sizing: border-box; font-family: inherit; font-size: 1em; transition: border-color 0.2s; background: #fff; }
.form-group input:focus { outline: none; border-color: #212b46; box-shadow: 0 0 0 3px rgba(33, 43, 70, 0.1); }
.alert-error { background: #fee2e2; color: #b91c1c; padding: 12px; border-radius: 8px; margin-bottom: 20px; font-size: 0.95em; font-weight: 500; border-left: 4px solid #ef4444; }

/* Custom Status Dropdown */
.status-dropdown-wrapper { position: relative; display: inline-block; }
.status-dropdown-toggle { cursor: pointer; user-select: none; display: inline-flex; align-items: center; gap: 5px; transition: transform 0.2s; white-space: nowrap; }
.status-dropdown-toggle:hover { filter: brightness(0.9); transform: translateY(-1px); }
.status-dropdown-menu { display: none; position: absolute; top: calc(100% + 5px); left: 0; min-width: 150px; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); z-index: 105; overflow: hidden; padding: 5px 0; }
.status-dropdown-menu.active { display: block; animation: modalFadeIn 0.2s ease; }
.status-dropdown-item { padding: 8px 15px; display: block; font-size: 13px; font-weight: 500; transition: background 0.2s; cursor: pointer; }
.status-dropdown-item:hover { background: #f1f5f9; }

/* Notifications UI */
.nav-bell { position: relative; display: inline-block; }
.nav-bell a { margin: 0 !important; color: #cca959; font-size: 1.3em; transition: all 0.3s ease; display: inline-flex; align-items: center; justify-content: center; }
.nav-bell a:hover { color: #020b42; transform: scale(1.1); }
.notif-badge { position: absolute; top: -6px; right: -8px; background: #ef4444; color: white; font-size: 0.55em; font-weight: bold; padding: 3px 5px; border-radius: 10px; box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3); min-width: 12px; text-align: center; line-height: 1; border: 2px solid #fff; }
.notif-dropdown { display: none; position: absolute; top: 35px; right: -50px; width: 300px; background: #fff; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); border: 1px solid #e2e8f0; overflow: hidden; z-index: 1000; text-align: left; }
.notif-dropdown a { display: block !important; padding: 15px !important; margin: 0 !important; border-bottom: 1px solid #f1f5f9; color: #334155; font-size: 0.9em !important; font-weight: 500 !important; white-space: normal; line-height: 1.4; }
.notif-dropdown a:hover { background: #f8fafc; color: #212b46; transform: none !important; }
.notif-item { display: flex !important; flex-direction: column; gap: 4px; }
.notif-project { font-weight: 700; color: #020b42; font-size: 0.95em; display: flex; align-items: center; gap: 6px; }
.notif-text { color: #4b5563; font-size: 0.9em; }
.notif-time { color: #9ca3af; font-size: 0.75em; text-align: left; margin-top: 4px; font-weight: 400; display: flex; align-items: center; gap: 4px; }

/* Cookie Banner & Toggle Switch */
.cookie-banner { position: fixed; bottom: 20px; left: 20px; max-width: 380px; background: #fff; padding: 25px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); border: 1px solid #e2e8f0; z-index: 9998; display: none; }
.cookie-banner h3 { margin-top: 0; margin-bottom: 10px; font-size: 1.15em; color: #020b42; }
.cookie-banner p { font-size: 0.9em; color: #4b5563; margin-bottom: 20px; line-height: 1.5; }
.cookie-buttons { display: flex; gap: 10px; }
.cookie-option { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid #f1f5f9; }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .4s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
input:checked + .slider { background-color: #10b981; }
input:checked + .slider:before { transform: translateX(20px); }
input:disabled + .slider { background-color: #e2e8f0; cursor: not-allowed; }
input:disabled:checked + .slider { background-color: #6ee7b7; }

/* Portal Desktop Layout Fixes */
.portal-layout { display: grid; grid-template-columns: 220px 1fr; align-items: start; }
.admin-sidebar, .portal-sidebar { padding: 20px 10px; }
.admin-sidebar ul, .portal-sidebar ul { list-style: none; padding: 0; margin: 0; }
.admin-sidebar ul li a, .portal-sidebar ul li a { display: flex; align-items: center; padding: 10px 15px; color: #475569; text-decoration: none; border-radius: 8px; margin-bottom: 5px; font-weight: 500; font-size: 13px; line-height: 1.2; transition: all 0.2s; }
.admin-sidebar ul li a:hover, .portal-sidebar ul li a:hover { background: #f1f5f9; color: #020b42; }
.admin-sidebar ul li a.active, .portal-sidebar ul li a.active { background: #020b42; color: #fff; }
.admin-sidebar ul li a i, .portal-sidebar ul li a i { margin-right: 12px; width: 20px; text-align: center; flex-shrink: 0; }

/* Responsive Design / Mobile Version */
@media (max-width: 768px) {
    .nav-container { flex-direction: column; gap: 15px; padding: 15px; }
    .nav-logo { position: static; margin-bottom: 5px; }
    .nav-links { flex-wrap: wrap; justify-content: center; gap: 12px; }
    .navbar a { margin: 0 5px; font-size: 0.95em; }
    .nav-dropdown-content { left: 50%; transform: translateX(-50%); text-align: center; }
    .lang-switcher { position: static; margin-top: 5px; }
    header { padding: 50px 20px; }
    header h1 { font-size: 2em; }
    header p { font-size: 1.05em; }
    .services-grid { grid-template-columns: 1fr; gap: 20px; }
    .single-view { padding: 30px 20px; }
    .single-view h2 { font-size: 1.6em; }
    .footer-grid { gap: 30px; text-align: center; grid-template-columns: 1fr; }
    .footer-col { display: flex; flex-direction: column; align-items: center; }
    .footer-col li { justify-content: center; text-align: center; }
    .footer-bottom { flex-direction: column; justify-content: center; text-align: center; }
    .modal-content { padding: 25px 20px; width: 90%; max-width: none; box-sizing: border-box; }
    form > div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; gap: 10px !important; }
    .btn-secondary { margin-left: 0; margin-top: 10px; display: block; width: 100%; box-sizing: border-box; }
    .single-view .btn { display: block; width: 100%; box-sizing: border-box; }
}