/* ============================================
   Gulf Commerce AI — Global Styles
   Path: /home/app.gulfcommerce.ai/public_html/assets/css/app.css
   ============================================ */

:root {
    --primary: #0A5C8E;
    --primary-dark: #073D5E;
    --accent: #F5A623;
    --bg: #F7F9FB;
    --text: #1F2937;
    --text-light: #6B7280;
    --border: #E5E7EB;
    --white: #FFFFFF;
    --error: #DC2626;
    --success: #16A34A;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'IBM Plex Sans Arabic', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.logo img {
    width: 40px;
    height: 40px;
}

.logo span {
    font-weight: 700;
    font-size: 1.1rem;
}

.app-header nav a {
    margin-left: 1rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.app-header nav a:hover {
    text-decoration: underline;
}

.app-main {
    flex: 1;
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.app-footer {
    text-align: center;
    padding: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Forms & Buttons */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
}

button,
.button {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

button:hover,
.button:hover {
    background: var(--primary-dark);
}

.error {
    color: var(--error);
    margin-top: 0.5rem;
}

/* AI Corporate Auth Page Styles - Glossy Light Mode */
body:has(.auth-container) {
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    color: #1e293b;
    min-height: 100vh;
}

body:has(.auth-container) .app-header,
body:has(.auth-container) .app-footer {
    display: none;
}

body:has(.auth-container) .app-main {
    padding: 0;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Background animated elements for a modern feel */
body:has(.auth-container) .app-main::before,
body:has(.auth-container) .app-main::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    animation: float 10s infinite alternate;
}

body:has(.auth-container) .app-main::before {
    background: rgba(10, 92, 142, 0.15); /* primary */
    top: -150px;
    left: -150px;
}

body:has(.auth-container) .app-main::after {
    background: rgba(245, 166, 35, 0.1); /* accent */
    bottom: -150px;
    right: -150px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 60px) scale(1.1); }
}

.auth-container {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 2rem;
}

.auth-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 3.5rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08), 
                inset 0 1px 0 rgba(255, 255, 255, 1);
    width: 100%;
    max-width: 440px;
    color: #1e293b;
}

.auth-card h1 {
    margin-bottom: 2.5rem;
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #0A5C8E 0%, #1e293b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.auth-card .form-group label {
    color: #475569;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.auth-card .form-group input {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(203, 213, 225, 0.8);
    color: #1e293b;
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.auth-card .form-group input:focus {
    outline: none;
    border-color: #0A5C8E;
    box-shadow: 0 0 0 4px rgba(10, 92, 142, 0.15),
                inset 0 2px 4px rgba(0,0,0,0.02);
    background: #ffffff;
}

.auth-card button[type="submit"] {
    width: 100%;
    padding: 1.1rem;
    margin-top: 1.5rem;
    background: linear-gradient(180deg, #1072af 0%, #0A5C8E 100%);
    color: #ffffff;
    border: 1px solid #084972;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(10, 92, 142, 0.2), 
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

.auth-card button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(10, 92, 142, 0.3), 
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(180deg, #1282c6 0%, #0c6ca5 100%);
}

.auth-card button[type="submit"]:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(10, 92, 142, 0.2), 
                inset 0 2px 4px rgba(0,0,0,0.2);
    background: #0A5C8E;
}

.auth-card p {
    margin-top: 2rem;
    text-align: center;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
}

.auth-card p a {
    color: #0A5C8E;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
}

.auth-card p a:hover {
    color: #F5A623;
    text-decoration: underline;
}

.auth-card .error {
    background: rgba(254, 226, 226, 0.8);
    border-left: 4px solid #ef4444;
    padding: 1rem;
    border-radius: 6px;
    color: #991b1b;
    font-size: 0.9rem;
    margin-top: 2rem;
    text-align: center;
    font-weight: 600;
}

/* Theme Toggle Styles */
.theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.theme-toggle button {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
    padding: 0.3rem;
    border-radius: 50%;
}

.theme-toggle button:hover {
    opacity: 0.8;
}

.theme-toggle button.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Auth Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: #94a3b8;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #cbd5e1;
}
.divider span {
    padding: 0 10px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Google Button */
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    width: 100%;
    padding: 1rem;
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.google-btn:hover {
    background: #f8fafc;
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
}

/* Dark Mode Overrides */
[data-theme="dark"] body {
    background: #0d1b2a;
    color: #e0e0e0;
}

[data-theme="dark"] body:has(.auth-container) {
    background: radial-gradient(circle at top left, #0d1b2a, #020408);
}

[data-theme="dark"] .auth-card {
    background: rgba(20, 24, 30, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6);
    color: #ffffff;
}

[data-theme="dark"] .auth-card h1 {
    background: linear-gradient(135deg, #ffffff 0%, #9ca3af 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .auth-card .form-group input {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

[data-theme="dark"] .auth-card .form-group input:focus {
    background: rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .divider::before, 
[data-theme="dark"] .divider::after {
    border-bottom: 1px solid #334155;
}

[data-theme="dark"] .google-btn {
    background: #1e293b;
    color: #f8fafc;
    border-color: #334155;
}

[data-theme="dark"] .google-btn:hover {
    background: #0f172a;
}