@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700&display=swap');

* {
    font-family: 'Cairo', sans-serif;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    direction: rtl;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    top: -200px;
    right: -100px;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.login-container::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border-radius: 50%;
    bottom: -150px;
    left: -100px;
    opacity: 0.3;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 50px 40px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card h2 {
    color: #1a1a2e;
    margin-bottom: 30px;
    font-weight: 700;
}

.login-card .form-control {
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.login-card .form-control:focus {
    background: #fff;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.login-card .form-control::placeholder {
    color: #adb5bd;
}

.login-card .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-card .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.login-card .btn-primary:hover::before {
    left: 100%;
}

.login-card .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

.login-card .btn-primary:active {
    transform: translateY(-1px);
}

.input-group-text {
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 12px 0 0 12px !important;
    color: #667eea;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    z-index: 5;
}

.input-with-icon .form-control {
    padding-right: 45px;
}

.logo-wrapper {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 25px 30px;
    border-radius: 16px;
    display: inline-block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.logo-wrapper img {
    filter: brightness(1.1);
}

@media (max-width: 576px) {
    .login-card {
        padding: 35px 25px;
        margin: 10px;
        border-radius: 20px;
    }
    
    .login-container::before {
        width: 250px;
        height: 250px;
        top: -125px;
        right: -80px;
    }
    
    .login-container::after {
        width: 200px;
        height: 200px;
        bottom: -100px;
        left: -80px;
    }
    
    .logo-wrapper {
        padding: 20px 25px;
    }
}

.form-control {
    border-radius: 10px;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.sidebar {
    background: linear-gradient(180deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    padding: 0;
    position: fixed;
    width: 280px;
    right: 0;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    z-index: 1000;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 3px;
}

.sidebar .logo {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    padding: 25px 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
    position: relative;
}

.sidebar .logo::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 20%;
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
}

.sidebar .logo img {
    transition: transform 0.3s ease;
}

.sidebar .logo:hover img {
    transform: scale(1.05);
}

.sidebar nav {
    padding: 10px 0;
}

.sidebar .nav-section {
    padding: 15px 20px 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    margin: 4px 12px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.sidebar .nav-link::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #667eea, #764ba2);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    border-radius: 0 3px 3px 0;
}

.sidebar .nav-link:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #fff;
    transform: translateX(-5px);
}

.sidebar .nav-link:hover::before {
    transform: scaleY(1);
}

.sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.25) 0%, rgba(118, 75, 162, 0.15) 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.sidebar .nav-link.active::before {
    transform: scaleY(1);
}

.sidebar .nav-link i {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.sidebar .nav-link:hover i {
    transform: scale(1.15);
}

.sidebar .nav-link span {
    font-weight: 500;
    font-size: 14px;
}

.sidebar .nav-link.logout-link {
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    color: rgba(235, 51, 73, 0.8);
}

.sidebar .nav-link.logout-link:hover {
    background: linear-gradient(90deg, rgba(235, 51, 73, 0.15) 0%, rgba(244, 92, 67, 0.1) 100%);
    color: #eb3349;
}

.sidebar .nav-link.logout-link::before {
    background: linear-gradient(180deg, #eb3349, #f45c43);
}

/* Sidebar Icons Colors */
.sidebar .nav-link .fa-home { color: #667eea; }
.sidebar .nav-link .fa-ad { color: #a855f7; }
.sidebar .nav-link .fa-server { color: #22c55e; }
.sidebar .nav-link .fa-search { color: #f97316; }
.sidebar .nav-link .fa-cog { color: #6b7280; }
.sidebar .nav-link .fa-users { color: #06b6d4; }
.sidebar .nav-link .fa-clipboard-list { color: #ec4899; }
.sidebar .nav-link .fa-sign-out-alt { color: #ef4444; }

.sidebar .nav-link:hover .fa-home,
.sidebar .nav-link.active .fa-home { color: #818cf8; }
.sidebar .nav-link:hover .fa-ad,
.sidebar .nav-link.active .fa-ad { color: #c084fc; }
.sidebar .nav-link:hover .fa-server,
.sidebar .nav-link.active .fa-server { color: #4ade80; }
.sidebar .nav-link:hover .fa-search,
.sidebar .nav-link.active .fa-search { color: #fb923c; }
.sidebar .nav-link:hover .fa-cog,
.sidebar .nav-link.active .fa-cog { color: #9ca3af; }
.sidebar .nav-link:hover .fa-users,
.sidebar .nav-link.active .fa-users { color: #22d3ee; }
.sidebar .nav-link:hover .fa-clipboard-list,
.sidebar .nav-link.active .fa-clipboard-list { color: #f472b6; }

.main-content {
    margin-right: 280px;
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
}

@media (max-width: 992px) {
    .sidebar {
        width: 100%;
        position: relative;
        min-height: auto;
    }
    
    .main-content {
        margin-right: 0;
    }
}

.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 15px 15px 0 0 !important;
    padding: 15px 20px;
    font-weight: 600;
}

.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    color: #1a1a2e;
    font-weight: 600;
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    border: none;
}

.btn-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
}

.btn-info:hover {
    color: #fff;
}

.stat-card {
    border-radius: 15px;
    padding: 25px;
    color: #fff;
    margin-bottom: 20px;
}

.stat-card.purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card.green {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.stat-card.orange {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-card p {
    margin: 0;
    opacity: 0.9;
}

.payment-badge {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.payment-badge.paid {
    background: #d4edda;
    color: #155724;
}

.payment-badge.unpaid {
    background: #f8d7da;
    color: #721c24;
}

.project-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: #fff;
    padding: 35px 40px;
    border-radius: 20px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
}

.project-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: shimmer 3s ease-in-out infinite;
}

.project-header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

@keyframes shimmer {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.project-header h2 {
    margin: 0 0 10px 0;
    font-weight: 700;
    font-size: 28px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.project-header h2 i {
    background: rgba(255, 255, 255, 0.2);
    padding: 12px;
    border-radius: 12px;
    margin-left: 15px;
    font-size: 24px;
}

.project-header p {
    position: relative;
    z-index: 1;
    opacity: 0.95;
    font-size: 15px;
}

.project-header p i {
    margin-left: 5px;
    opacity: 0.8;
}

.project-header .badge {
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.project-header .badge.bg-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
}

.project-header .badge.bg-warning {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%) !important;
    color: #1a1a2e !important;
}

.project-header .badge.bg-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%) !important;
}

.project-header .d-flex {
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .project-header {
        padding: 25px 20px;
    }
    
    .project-header h2 {
        font-size: 22px;
    }
    
    .project-header::after {
        width: 100px;
        height: 100px;
    }
}

.info-card {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.info-card label {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.info-card p {
    color: #1a1a2e;
    font-weight: 600;
    margin: 0;
    font-size: 16px;
}
