/**
 * Main Stylesheet - Dark Theme with Animations & Gradients
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a90e2;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-color: #1a1f3a;
    --secondary-gradient: linear-gradient(135deg, #1a1f3a 0%, #252b4a 100%);
    --success-color: #27ae60;
    --success-gradient: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    --error-color: #e74c3c;
    --error-gradient: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    --warning-color: #f39c12;
    --warning-gradient: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    --info-color: #3498db;
    --info-gradient: linear-gradient(135deg, #3498db 0%, #2980b9 100%);

    /* Dark Theme Colors */
    --bg-color: #0a0e27;
    --bg-secondary: #1a1f3a;
    --bg-tertiary: #252b4a;
    --text-color: #ffffff;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --border-color: #2d3748;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(74, 144, 226, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f1419 100%);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    position: relative;
    overflow: hidden;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.3) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.login-box {
    background: rgba(26, 31, 58, 0.9);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
    animation: slideInUp 0.6s ease-out;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-size: 2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeIn 0.8s ease-out;
}

.login-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    background: rgba(37, 43, 74, 0.5);
    border-radius: 10px;
    padding: 0.25rem;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    border-radius: 8px;
    position: relative;
}

.tab-btn.active {
    color: var(--text-color);
    background: var(--primary-gradient);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.tab-btn:hover:not(.active) {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
}

.login-form {
    display: none;
    animation: fadeIn 0.4s ease-in;
}

.login-form.active {
    display: block;
}

.form-group {
    margin-bottom: 1.5rem;
    animation: slideInUp 0.5s ease-out both;
}

.form-group:nth-child(1) {
    animation-delay: 0.1s;
}

.form-group:nth-child(2) {
    animation-delay: 0.2s;
}

.form-group:nth-child(3) {
    animation-delay: 0.3s;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(37, 43, 74, 0.6);
    color: var(--text-color);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
    transform: scale(1.02);
    background: rgba(37, 43, 74, 0.8);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

.btn-success {
    background: var(--success-gradient);
    color: white;
}

.btn-success:hover {
    box-shadow: 0 6px 25px rgba(39, 174, 96, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

.btn-secondary:hover {
    box-shadow: 0 6px 25px rgba(107, 114, 128, 0.5);
}

.btn-danger {
    background: var(--error-gradient);
    color: white;
}

.btn-danger:hover {
    box-shadow: 0 6px 25px rgba(231, 76, 60, 0.5);
}

.btn-warning {
    background: var(--warning-gradient);
    color: white;
}

.btn-warning:hover {
    box-shadow: 0 6px 25px rgba(243, 156, 18, 0.5);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.notification.show {
    transform: translateX(0);
    animation: slideInRight 0.4s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-success {
    background: var(--success-gradient);
}

.notification-error {
    background: var(--error-gradient);
}

.notification-info {
    background: var(--info-gradient);
}

.notification-warning {
    background: var(--warning-gradient);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid;
    transition: all 0.3s ease;
}

.status-badge:hover {
    transform: scale(1.1);
}

.status-active {
    background: rgba(39, 174, 96, 0.2);
    color: var(--success-color);
    border-color: var(--success-color);
}

.status-inactive {
    background: rgba(231, 76, 60, 0.2);
    color: var(--error-color);
    border-color: var(--error-color);
}

.status-completed {
    background: rgba(39, 174, 96, 0.2);
    color: var(--success-color);
    border-color: var(--success-color);
}

.status-pending {
    background: rgba(243, 156, 18, 0.2);
    color: var(--warning-color);
    border-color: var(--warning-color);
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(26, 31, 58, 0.6);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    animation: fadeIn 0.5s ease-out;
}

.data-table thead {
    background: var(--secondary-gradient);
    color: white;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.data-table tbody tr {
    transition: all 0.3s ease;
}

.data-table tbody tr:hover {
    background: rgba(74, 144, 226, 0.1);
    transform: translateX(5px);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Loading */
.loading {
    text-align: center;
    color: var(--text-secondary);
    animation: pulse 2s ease-in-out infinite;
}

.error {
    padding: 1rem;
    background: rgba(231, 76, 60, 0.1);
    color: var(--error-color);
    border-radius: 10px;
    margin: 1rem 0;
    border: 1px solid var(--error-color);
    animation: slideInDown 0.4s ease-out;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: rgba(26, 31, 58, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: scaleIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--secondary-gradient);
}

.modal-header h2 {
    margin: 0;
    color: var(--text-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(231, 76, 60, 0.2);
    color: var(--error-color);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
    color: var(--text-color);
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: rgba(37, 43, 74, 0.3);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: rgba(37, 43, 74, 0.6);
    color: var(--text-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Search Input */
.search-input {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: rgba(37, 43, 74, 0.6);
    color: var(--text-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 300px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2), 0 4px 15px rgba(74, 144, 226, 0.3);
    transform: scale(1.02);
    background: rgba(37, 43, 74, 0.8);
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .login-box {
        margin: 1rem;
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .search-input {
        width: 100% !important;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 1rem;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .pagination button {
        flex: 1;
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 1rem;
    }

    .login-box h1 {
        font-size: 1.5rem;
    }

    .notification {
        right: 10px;
        left: 10px;
        top: 10px;
        transform: translateY(-100px);
    }

    .notification.show {
        transform: translateY(0);
    }
}