@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&family=Roboto+Condensed:wght@400;700&display=swap');

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

body {
    font-family: 'Lato', Arial, sans-serif;
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 50%, #e1f5fe 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Top Bar */
.header-top {
    background: #035790;
    padding: 6px 0;
    font-size: 13px;
    color: #fff;
    font-family: 'Roboto Condensed', sans-serif;
}

.header-top .container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}

.header-top a {
    color: #fff;
    text-decoration: none;
}

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

.header-top .active-lang {
    font-weight: bold;
    text-decoration: underline;
}

.lang-sep {
    color: rgba(255,255,255,0.5);
}

/* RTL support for Arabic */
html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .header .container {
    flex-direction: row-reverse;
}

html[dir="rtl"] .tagline {
    direction: rtl;
}

html[dir="rtl"] .form-group label {
    text-align: right;
}

html[dir="rtl"] .login-form {
    text-align: right;
}

html[dir="rtl"] .header-top .container {
    flex-direction: row-reverse;
}

/* Header Styles */
.header {
    background-image: url("https://www.onp.ma/wp-content/uploads/2012/10/bg.jpg");
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    background-color: #fff;
    padding: 20px 0;
    position: relative;
    overflow: hidden;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.logo-section {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-subtitle {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-subtitle .arabic {
    font-size: 11px;
    color: #666;
    direction: rtl;
}

.logo-subtitle .french {
    font-size: 10px;
    color: #006699;
    font-weight: bold;
}

.tagline {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.tagline-text {
    font-family: "Roboto Condensed", sans-serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #027bc1;
}

.year {
    font-family: "Roboto Condensed", sans-serif;
    font-size: 52px;
    font-weight: 700;
    color: #008364;
    line-height: 1;
}

/* Page Title */
.page-title {
    background: #007bc0;
    color: #fff;
    padding: 14px 20px;
    text-align: center;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px 0;
}

/* Login Section */
.login-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    max-width: 900px;
    margin: 0 auto;
}

.lock-image {
    flex-shrink: 0;
}

.lock-image img {
    width: 280px;
    height: auto;
}

.login-form {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    min-width: 400px;
}

.login-form h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 500;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #2196F3;
}

.form-group input::placeholder {
    color: #999;
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(90deg, #1976D2 0%, #2196F3 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit:hover {
    background: linear-gradient(90deg, #1565C0 0%, #1976D2 100%);
}

/* Alert Messages */
.alert {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Dashboard Styles */
.dashboard-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.dashboard-content h2 {
    color: #006699;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.dashboard-info {
    margin: 30px 0;
    line-height: 1.8;
    color: #555;
}

.dashboard-info p {
    margin-bottom: 12px;
}

.dashboard-actions {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
}

.btn-logout {
    display: inline-block;
    padding: 10px 30px;
    background: #dc3545;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: #c82333;
}

/* Footer */
.footer {
    background: white;
    padding: 15px 0;
    margin-top: auto;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #8BC34A 50%, #CDDC39 100%);
    width: 70%;
    transition: width 0.3s;
}

.version {
    text-align: center;
    color: #666;
    font-size: 13px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-top .container {
        justify-content: center;
        font-size: 12px;
    }

    .header .container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .tagline {
        gap: 8px;
    }
    
    .tagline-text {
        font-size: 16px;
    }
    
    .year {
        font-size: 36px;
    }
    
    .login-section {
        flex-direction: column;
        gap: 30px;
    }
    
    .lock-image img {
        width: 200px;
    }
    
    .login-form {
        min-width: auto;
        width: 100%;
        max-width: 400px;
        padding: 30px 20px;
    }
    
    .page-title {
        font-size: 16px;
        padding: 12px;
    }
}

/* ── Employee Profile Page ─────────────────────────────── */

.profile-card {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    max-width: 900px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0f0fb;
}

.profile-icon {
    background: #e3f2fd;
    border-radius: 50%;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-header h2 {
    color: #006699;
    font-size: 22px;
    margin-bottom: 4px;
}

.profile-subtitle {
    color: #666;
    font-size: 14px;
}

/* Form sections */
.form-section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    color: #006699;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #f0f8ff;
    border-left: 4px solid #006699;
    border-radius: 0 4px 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-icon {
    font-size: 17px;
}

/* Two-column grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
}

.form-group--full {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-weight: 500;
    font-size: 13px;
}

.required {
    color: #c0392b;
    font-size: 13px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid #cdd9e5;
    border-radius: 5px;
    font-size: 14px;
    color: #333;
    background: #fafcff;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1976D2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.12);
    background: #fff;
}

.form-group input::placeholder {
    color: #b0b8c4;
    font-size: 13px;
}

/* Action buttons */
.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.btn-primary {
    padding: 11px 32px;
    background: linear-gradient(90deg, #1976D2 0%, #2196F3 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
}

.btn-primary:hover {
    background: linear-gradient(90deg, #1565C0 0%, #1976D2 100%);
}

.btn-secondary {
    padding: 10px 24px;
    background: transparent;
    color: #666;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.btn-secondary:hover {
    background: #f5f5f5;
    color: #333;
}

/* Dashboard profile summary banner */
.profile-banner {
    background: linear-gradient(90deg, #e3f2fd, #f0f8ff);
    border: 1px solid #bbdefb;
    border-radius: 6px;
    padding: 14px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-banner p {
    color: #1565C0;
    font-size: 14px;
    margin: 0;
}

.profile-banner .btn-edit {
    display: inline-block;
    padding: 6px 18px;
    background: #1976D2;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.profile-banner .btn-edit:hover {
    background: #1565C0;
}

/* Responsive */
@media (max-width: 640px) {
    .profile-card {
        padding: 24px 16px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group--full {
        grid-column: 1;
    }

    .form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }
}
