/* ============================================
   HALAQAT MODERN DESIGN SYSTEM
   Version 2.1 - Mobile-First - Last Updated: 2026-01-29
   ============================================ */

/* ============================================
   1. CSS RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tahoma', sans-serif;
    background: linear-gradient(135deg, #1a1f2e 0%, #0f1419 100%);
    background-attachment: fixed;
    color: #f1c40f;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   2. ANIMATED BACKGROUND PATTERN
   ============================================ */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(241, 196, 15, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(52, 152, 219, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   3. HEADER STYLES (Mobile-First)
   ============================================ */
header {
    background: linear-gradient(135deg, #1a2332 0%, #2c3e50 100%);
    padding: 15px 20px;
    border-bottom: 3px solid #f1c40f;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    position: relative;
    z-index: 10;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center;
    align-items: center;
}

.header-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.header-title a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.header-title a:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.header-title h1 {
    color: #f1c40f;
    font-size: 20px;
    margin: 0;
    transition: all 0.3s ease;
}

.header-title a:hover h1 {
    color: #f39c12;
}

.header-title .icon {
    font-size: 32px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.user-name {
    color: #fff;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 8px;
}

.logout-btn {
    background: #e74c3c;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.logout-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

/* ============================================
   4. MAIN CONTENT LAYOUT (Mobile-First)
   ============================================ */
main {
    flex: 1;
    padding: 20px 10px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

.content-title {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeInDown 0.6s ease;
}

.content-title h2 {
    color: #f1c40f;
    font-size: 22px;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.content-title p {
    color: #bdc3c7;
    font-size: 17px;
    font-weight: 300;
}

/* ============================================
   5. RESPONSIVE GRID SYSTEM (Mobile-First)
   ============================================ */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   6. CARD COMPONENT SYSTEM (Mobile-First)
   ============================================ */
.card {
    background: rgba(26, 31, 46, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(241, 196, 15, 0.2);
    padding: 18px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: #f1c40f;
    font-weight: bold;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 85px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.4s ease;
    animation-fill-mode: both;
}

/* Stagger animation for cards */
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.2s; }
.card:nth-child(5) { animation-delay: 0.25s; }
.card:nth-child(6) { animation-delay: 0.3s; }
.card:nth-child(7) { animation-delay: 0.35s; }
.card:nth-child(8) { animation-delay: 0.4s; }
.card:nth-child(9) { animation-delay: 0.45s; }
.card:nth-child(10) { animation-delay: 0.5s; }
.card:nth-child(11) { animation-delay: 0.55s; }
.card:nth-child(12) { animation-delay: 0.6s; }
.card:nth-child(13) { animation-delay: 0.65s; }
.card:nth-child(14) { animation-delay: 0.7s; }
.card:nth-child(15) { animation-delay: 0.75s; }
.card:nth-child(16) { animation-delay: 0.8s; }
.card:nth-child(17) { animation-delay: 0.85s; }
.card:nth-child(18) { animation-delay: 0.9s; }
.card:nth-child(19) { animation-delay: 0.95s; }
.card:nth-child(20) { animation-delay: 1.0s; }

/* Top accent border */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f1c40f 0%, #e67e22 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Glowing effect on hover */
.card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(241, 196, 15, 0.2) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    pointer-events: none;
    z-index: -1;
}

.card:hover::before {
    opacity: 1;
}

.card:hover::after {
    width: 400px;
    height: 400px;
}

.card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 15px 35px rgba(241, 196, 15, 0.4),
                0 5px 15px rgba(0, 0, 0, 0.3);
    border-color: rgba(241, 196, 15, 0.6);
}

/* Card Icon */
.card-icon {
    font-size: 38px;
    display: block;
    margin-bottom: 12px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
    transition: transform 0.4s ease;
}

.card:hover .card-icon {
    transform: scale(1.15) rotateY(360deg);
}

/* Card Text */
.card-title {
    font-size: 16px;
    font-weight: bold;
    line-height: 1.3;
    margin-bottom: 6px;
    text-align: center;
    transition: color 0.3s ease;
}

.card:hover .card-title {
    color: #fff;
    text-shadow: 0 2px 8px rgba(241, 196, 15, 0.8);
}

.card-description {
    font-size: 12px;
    opacity: 0.75;
    line-height: 1.4;
    font-weight: normal;
    text-align: center;
    transition: opacity 0.3s ease;
}

.card:hover .card-description {
    opacity: 1;
    color: #ecf0f1;
}

/* ============================================
   7. COLOR-CODED CARD VARIANTS
   ============================================ */
.card-primary {
    border-color: rgba(52, 152, 219, 0.3);
}
.card-primary:hover {
    box-shadow: 0 15px 35px rgba(52, 152, 219, 0.4), 0 5px 15px rgba(0, 0, 0, 0.3);
}
.card-primary::before {
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
}

.card-success {
    border-color: rgba(39, 174, 96, 0.3);
}
.card-success:hover {
    box-shadow: 0 15px 35px rgba(39, 174, 96, 0.4), 0 5px 15px rgba(0, 0, 0, 0.3);
}
.card-success::before {
    background: linear-gradient(90deg, #27ae60 0%, #229954 100%);
}

.card-warning {
    border-color: rgba(243, 156, 18, 0.3);
}
.card-warning:hover {
    box-shadow: 0 15px 35px rgba(243, 156, 18, 0.4), 0 5px 15px rgba(0, 0, 0, 0.3);
}
.card-warning::before {
    background: linear-gradient(90deg, #f39c12 0%, #e67e22 100%);
}

.card-info {
    border-color: rgba(155, 89, 182, 0.3);
}
.card-info:hover {
    box-shadow: 0 15px 35px rgba(155, 89, 182, 0.4), 0 5px 15px rgba(0, 0, 0, 0.3);
}
.card-info::before {
    background: linear-gradient(90deg, #9b59b6 0%, #8e44ad 100%);
}

.card-danger {
    border-color: rgba(231, 76, 60, 0.3);
}
.card-danger:hover {
    box-shadow: 0 15px 35px rgba(231, 76, 60, 0.4), 0 5px 15px rgba(0, 0, 0, 0.3);
}
.card-danger::before {
    background: linear-gradient(90deg, #e74c3c 0%, #c0392b 100%);
}

/* ============================================
   8. BUTTON COMPONENTS
   ============================================ */
.btn {
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
    font-size: 16px;
}

.btn-primary {
    background: #f1c40f;
    color: #000;
}

.btn-primary:hover {
    background: #d4af37;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(241, 196, 15, 0.4);
}

.btn-success {
    background: #27ae60;
    color: #fff;
}

.btn-success:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.4);
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.4);
}

.btn-secondary {
    background: #7f8c8d;
    color: #fff;
}

.btn-secondary:hover {
    background: #6c7a7b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(127, 140, 141, 0.4);
}

.btn-info {
    background: #3498db;
    color: #fff;
}

.btn-info:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.4);
}

/* ============================================
   9. FORM COMPONENTS (Mobile-First)
   ============================================ */
.form-container {
    background: rgba(26, 31, 46, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(241, 196, 15, 0.2);
    padding: 25px 20px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #f1c40f;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 16px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(241, 196, 15, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 16px;
    font-family: 'Tahoma', sans-serif;
    transition: all 0.3s ease;
}

/* Dropdown options styling - applies to all select dropdowns */
select option {
    background: #1a1f2e;
    color: #fff;
    padding: 10px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #f1c40f;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid rgba(241, 196, 15, 0.2);
}

.form-section h3 {
    color: #f1c40f;
    margin-bottom: 20px;
    font-size: 22px;
}

/* ============================================
   10. ALERT COMPONENTS
   ============================================ */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 16px;
    animation: slideInDown 0.5s ease;
}

.alert-success {
    background: rgba(39, 174, 96, 0.2);
    border: 2px solid #27ae60;
    color: #2ecc71;
}

.alert-error {
    background: rgba(231, 76, 60, 0.2);
    border: 2px solid #e74c3c;
    color: #e74c3c;
}

.alert-info {
    background: rgba(52, 152, 219, 0.2);
    border: 2px solid #3498db;
    color: #3498db;
}

.alert-warning {
    background: rgba(243, 156, 18, 0.2);
    border: 2px solid #f39c12;
    color: #f39c12;
}

/* ============================================
   11. FOOTER STYLES (Mobile-First)
   ============================================ */
footer {
    background: linear-gradient(180deg, #0f1419 0%, #1a2332 100%);
    border-top: 3px solid #f1c40f;
    padding: 40px 20px;
    margin-top: auto;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 10;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.footer-item {
    color: #bdc3c7;
    font-size: 15px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.footer-item:hover {
    background: rgba(241, 196, 15, 0.1);
    transform: translateY(-2px);
}

.footer-item strong {
    color: #f1c40f;
    font-weight: bold;
}

.footer-copyright {
    color: #95a5a6;
    font-size: 14px;
    padding-top: 25px;
    border-top: 1px solid rgba(241, 196, 15, 0.2);
    line-height: 1.8;
}

.footer-copyright p {
    margin: 5px 0;
}

/* ============================================
   12. ANIMATION KEYFRAMES
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============================================
   13. UTILITY CLASSES
   ============================================ */
.text-center {
    text-align: center;
}

.text-gold {
    color: #f1c40f;
}

.text-white {
    color: #fff;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

/* ============================================
   14. RESPONSIVE BREAKPOINTS - MOBILE-FIRST
   ============================================ */

/* Tablet Devices (641px and up) */
@media (min-width: 641px) {
    body {
        padding: 0;
    }

    header {
        padding: 20px 40px;
    }

    .header-container {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .header-title {
        flex-direction: row;
        gap: 15px;
    }

    .header-title a {
        flex-direction: row;
        gap: 15px;
    }

    .header-title h1 {
        font-size: 22px;
    }

    .user-info {
        flex-direction: row;
        gap: 15px;
    }

    main {
        padding: 50px 20px;
    }

    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .card {
        padding: 20px 15px;
        min-height: 100px;
    }

    .form-container {
        padding: 35px 30px;
    }

    .footer-info {
        flex-direction: row;
        gap: 40px;
    }
}

/* Desktop Devices (1025px and up) */
@media (min-width: 1025px) {
    .header-title h1 {
        font-size: 24px;
    }

    .content-title h2 {
        font-size: 32px;
    }

    .grid-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    .card {
        padding: 22px 18px;
        min-height: 110px;
    }

    .form-container {
        padding: 40px;
    }

    .footer-info {
        gap: 50px;
    }
}

/* ============================================
   15. MOBILE-SPECIFIC STYLES (768px and below)
   ============================================ */
@media (max-width: 768px) {
    .user-info {
        display: none !important;
    }

    .header-title .icon {
        display: none !important;
    }

    .card-icon {
        display: none !important;
    }

    .form-title-icon {
        display: none !important;
    }

    .login-icon {
        display: none !important;
    }

    .stat-icon {
        display: none !important;
    }

    .section-icon {
        display: none !important;
    }

    .footer-info {
        display: none !important;
    }
}

/* ============================================
   16. PRINT STYLES
   ============================================ */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
    }

    header {
        background: #fff !important;
        border-bottom: 2px solid #000;
    }

    .header-title h1 {
        color: #000 !important;
    }

    .logout-btn {
        display: none;
    }

    .card {
        border: 1px solid #000 !important;
        background: #fff !important;
        color: #000 !important;
    }

    footer {
        display: none;
    }

    .btn {
        border: 1px solid #000 !important;
    }
}
