/* Modern Unified Styles - Created: 2025-05-18
   Description: Modern and responsive design for login and registration pages
*/

:root {
    --primary-color: #03b5e4;
    --primary-dark: #0295c0;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white-color: #ffffff;
}

/* ====== COMMON STYLES ====== */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f7fa;
    min-height: 100vh;
    
    max-width: 1000px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-control {
    height: 50px;
    border-radius: 10px;
    padding-left: 45px;
    font-size: 1rem;
    border: 1px solid #ced4da;
    transition: all 0.3s ease;
    width: 100%;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(3, 181, 228, 0.25);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-select {
    height: 50px;
    border-radius: 10px;
    padding-left: 45px;
    font-size: 1rem;
    border: 1px solid #ced4da;
    transition: all 0.3s ease;
    width: 100%;
    background-position: right 0.75rem center;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(3, 181, 228, 0.25);
}

.form-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
}

.form-check-label {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.form-check-label a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.form-check-label a:hover {
    text-decoration: underline;
}

.alert {
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    border: none;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.language-switch {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.language-switch select {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-switch select:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.3);
}

.language-switch select option {
    background-color: white;
    color: var(--dark-color);
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ====== LOGIN PAGE STYLES ====== */
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 1000px;
    background-color: var(--white-color);
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
}

.login-image {
    background: linear-gradient(135deg, #03b5e4, #0295c0);
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.login-image::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: url('https://img.freepik.com/premium-vector/casablanca-morocco-africa-city-map-blue-print-vector-illustration_478328-5339.jpg') no-repeat center center;
    background-size: cover;
    opacity: 0.1;
    animation: rotate 30s linear infinite;
}

.login-image img {
    max-width: 80%;
    max-height: 200px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
}

.login-image h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.login-form {
    width: 50%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    color: var(--dark-color);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.login-header p {
    color: var(--secondary-color);
    font-size: 1rem;
}

.btn-login {
    height: 50px;
    border-radius: 10px;
    background-color: var(--primary-color);
    border: none;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-top: 10px;
    width: 100%;
    cursor: pointer;
}

.btn-login:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(3, 181, 228, 0.3);
}

/* ====== REGISTER PAGE STYLES ====== */
body.register-page {
    padding: 40px 0;
}

.register-container {
    /*width: 100%;*/
    max-width: 1000px;
    margin: 0 auto;
    background-color: var(--white-color);
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.register-header {
    background: linear-gradient(135deg, #03b5e4, #0295c0);
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.register-header::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: url('https://img.freepik.com/premium-vector/casablanca-morocco-africa-city-map-blue-print-vector-illustration_478328-5339.jpg') no-repeat center center;
    background-size: cover;
    opacity: 0.1;
    top: -50%;
    left: -50%;
    animation: rotate 30s linear infinite;
}

.register-header img {
    max-width: 200px;
    max-height: 80px;
    margin: 0 auto 20px;
    display: block;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.2));
}

.register-header h2 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.register-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

.register-form {
    padding: 40px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.form-group {
    flex: 0 0 50%;
    padding: 0 10px;
    margin-bottom: 20px;
    position: relative;
}

.form-group.full-width {
    flex: 0 0 100%;
}

.form-check {
    padding-left: 2em;
    margin-bottom: 20px;
}

.form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-left: -2em;
    margin-top: 0.15em;
}

.btn-register {
    height: 50px;
    border-radius: 10px;
    background-color: var(--primary-color);
    border: none;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
    cursor: pointer;
}

.btn-register:hover:not(:disabled) {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(3, 181, 228, 0.3);
}

.btn-register:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.login-link {
    text-align: center;
    margin-top: 20px;
    font-size: 0.95rem;
    color: var(--secondary-color);
}

.login-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.login-link a:hover {
    text-decoration: underline;
}

/* ====== DASHBOARD STYLES ====== */
body.dashboard-page {
    background-color: #f5f7fa;
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.dashboard-header {
    background: linear-gradient(135deg, #03b5e4, #0295c0);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.dashboard-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-logo {
    display: flex;
    align-items: center;
}

.dashboard-logo img {
    height: 40px;
    margin-right: 10px;
}

.dashboard-logo h1 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
}

.dashboard-user-menu {
    display: flex;
    align-items: center;
}

.dashboard-user-info {
    display: flex;
    align-items: center;
    margin-right: 20px;
    cursor: pointer;
    position: relative;
}

.dashboard-user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.dashboard-user-info span {
    margin-left: 10px;
    font-weight: 500;
}

.dashboard-user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 200px;
    padding: 10px 0;
    margin-top: 10px;
    display: none;
    z-index: 1000;
}

.dashboard-user-dropdown.show {
    display: block;
}

.dashboard-user-dropdown a {
    display: block;
    padding: 10px 20px;
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

.dashboard-user-dropdown a:hover {
    background-color: #f5f7fa;
    color: var(--primary-color);
}

.dashboard-user-dropdown a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.dashboard-notifications {
    position: relative;
    margin-right: 20px;
}

.dashboard-notifications i {
    font-size: 1.5rem;
    cursor: pointer;
}

.dashboard-notifications .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-main {
    display: flex;
    flex: 1;
}

.dashboard-sidebar {
    width: 250px;
    background-color: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    padding: 20px 0;
    height: calc(100vh - 70px);
    position: sticky;
    top: 70px;
    overflow-y: auto;
}

.dashboard-sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dashboard-sidebar-menu li {
    margin-bottom: 5px;
}

.dashboard-sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.dashboard-sidebar-menu a:hover,
.dashboard-sidebar-menu a.active {
    background-color: rgba(3, 181, 228, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.dashboard-sidebar-menu a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.dashboard-sidebar-menu .submenu {
    list-style: none;
    padding-left: 30px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.dashboard-sidebar-menu .submenu.show {
    max-height: 500px;
}

.dashboard-sidebar-menu .has-submenu > a::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: auto;
    transition: transform 0.3s ease;
}

.dashboard-sidebar-menu .has-submenu.open > a::after {
    transform: rotate(180deg);
}

.dashboard-content {
    flex: 1;
    padding: 20px;
    overflow-x: hidden;
}

.dashboard-card {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.dashboard-card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-card-header h2 {
    font-size: 1.2rem;
    margin: 0;
    font-weight: 600;
    color: var(--dark-color);
}

.dashboard-card-body {
    padding: 20px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-stat-card {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 20px;
    display: flex;
    align-items: center;
}

.dashboard-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.8rem;
}

.dashboard-stat-icon.primary {
    background-color: rgba(3, 181, 228, 0.1);
    color: var(--primary-color);
}

.dashboard-stat-icon.success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.dashboard-stat-icon.warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
}

.dashboard-stat-icon.danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.dashboard-stat-info h3 {
    font-size: 1.5rem;
    margin: 0 0 5px;
    font-weight: 700;
}

.dashboard-stat-info p {
    margin: 0;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.dashboard-notices {
    margin-bottom: 20px;
}

.dashboard-notice-item {
    background-color: rgba(3, 181, 228, 0.1);
    border-left: 4px solid var(--primary-color);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.dashboard-notice-item i {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-right: 15px;
}

.dashboard-notice-item p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--dark-color);
}

.dashboard-chart-container {
    height: 400px;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.dashboard-table th {
    font-weight: 600;
    color: var(--dark-color);
    background-color: #f8f9fa;
}

.dashboard-table tbody tr:hover {
    background-color: #f8f9fa;
}

.dashboard-table .status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.dashboard-table .status.pending {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
}

.dashboard-table .status.completed {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.dashboard-table .status.cancelled {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.dashboard-table .actions {
    display: flex;
    gap: 5px;
}

.dashboard-table .actions button {
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dashboard-table .actions button.view {
    background-color: rgba(3, 181, 228, 0.1);
    color: var(--primary-color);
}

.dashboard-table .actions button.edit {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.dashboard-table .actions button.delete {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.dashboard-table .actions button:hover {
    opacity: 0.8;
}

.dashboard-pagination {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.dashboard-pagination button {
    width: 35px;
    height: 35px;
    border-radius: 5px;
    border: 1px solid #eee;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dashboard-pagination button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.dashboard-pagination button:hover:not(.active) {
    background-color: #f8f9fa;
}

.dashboard-footer {
    background-color: white;
    padding: 15px 0;
    text-align: center;
    border-top: 1px solid #eee;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.dashboard-mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 992px) {
    .dashboard-sidebar {
        position: fixed;
        left: -250px;
        top: 70px;
        transition: left 0.3s ease;
        z-index: 999;
    }
    
    .dashboard-sidebar.show {
        left: 0;
    }
    
    .dashboard-mobile-menu-toggle {
        display: block;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .dashboard-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 576px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .dashboard-user-info span {
        display: none;
    }
}

/* ====== RESPONSIVE STYLES ====== */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        max-width: 500px;
    }
    
    .login-image,
    .login-form {
        width: 100%;
    }
    
    .login-image {
        padding: 30px;
        min-height: 200px;
    }
    
    .login-form {
        padding: 30px;
    }
    
    .form-group {
        flex: 0 0 100%;
    }
    
    .register-container {
        margin: 0 15px;
    }
    
    .register-header, 
    .register-form {
        padding: 20px;
    }
    
    .register-header h2,
    .login-header h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    body.register-page {
        padding: 20px 0;
    }
    
    .login-image,
    .register-header {
        padding: 15px;
        min-height: 150px;
    }
    
    .login-form,
    .register-form {
        padding: 15px;
    }
    
    .login-header h2,
    .register-header h2 {
        font-size: 1.5rem;
    }
    
    .form-control, 
    .form-select, 
    .btn-login,
    .btn-register {
        height: 45px;
    }
}
