* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #4361ee;
    --secondary: #3a0ca3;
    --accent: #4cc9f0;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --gray: #6c757d;
    --light-gray: #e9ecef;
}

body {
    background-color: #f0f4f8;
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 15px;
}

.login-header h1 {
    color: var(--secondary);
    font-size: 26px;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--gray);
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark);
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.btn {
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #3a56d4;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.btn-primary:disabled {
    background: var(--gray);
    cursor: not-allowed;
    transform: none;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #43a047;
}

.btn-secondary {
    background: var(--light-gray);
    color: var(--dark);
}

.btn-secondary:hover {
    background: #dee2e6;
}

.error-message {
    background: rgba(244, 67, 54, 0.1);
    color: var(--danger);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.error-message.show {
    display: block;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.success-message {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.success-message.show {
    display: block;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--gray);
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Main App Container */
.app-container {
    display: none;
}

.app-container.active {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    color: white;
    padding: 20px 0;
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.logo i {
    font-size: 28px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 20px;
    font-weight: 600;
}

.nav-links {
    list-style: none;
    padding: 0 15px;
}

.nav-links li {
    margin-bottom: 5px;
}

.nav-links a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-links a.active {
    background: rgba(255, 255, 255, 0.2);
}

.nav-links i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.user-profile {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
}

.user-profile-info {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.user-details h4 {
    font-size: 14px;
    margin-bottom: 2px;
}

.user-details p {
    font-size: 12px;
    opacity: 0.8;
}

.logout-btn {
    width: 100%;
    padding: 10px;
    background: rgba(244, 67, 54, 0.2);
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn:hover {
    background: rgba(244, 67, 54, 0.4);
}

.logout-btn i {
    margin-right: 8px;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-gray);
    flex-wrap: wrap;
    gap: 15px;
}

.header h2 {
    color: var(--secondary);
    font-size: 28px;
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 30px;
    padding: 8px 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    min-width: 250px;
}

.search-box input {
    border: none;
    outline: none;
    flex: 1;
    padding: 5px;
    font-size: 14px;
}

.search-box i {
    color: var(--gray);
}

/* Dashboard Cards */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-header h3 {
    font-size: 16px;
    color: var(--gray);
}

.card-header i {
    font-size: 24px;
    color: var(--primary);
}

.card-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--secondary);
}

.card-footer {
    font-size: 14px;
    color: var(--gray);
}

/* Table Styles */
.data-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--light-gray);
}

.table-header h3 {
    color: var(--secondary);
    font-size: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

th {
    background-color: var(--light);
    font-weight: 600;
    color: var(--gray);
    font-size: 14px;
}

tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

.status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.status-pending {
    background: rgba(255, 152, 0, 0.1);
    color: var(--warning);
}

.status-completed {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success);
}

.status-in-progress {
    background: rgba(76, 201, 240, 0.1);
    color: var(--accent);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-gray);
    color: var(--gray);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.action-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--secondary);
    font-size: 22px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--gray);
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--danger);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--light-gray);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h3 {
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-container.active {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 10px;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }

    .nav-links li {
        margin: 0;
    }

    .nav-links a {
        padding: 10px 15px;
        font-size: 14px;
    }

    .user-profile {
        display: none;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-box {
        width: 100%;
    }

    .dashboard {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 14px;
    }

    th, td {
        padding: 10px;
    }

    .modal-content {
        max-width: 100%;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}
