/* Sunway Lagoon CRM Styles */
:root {
    --primary-color: #012066;
    --primary-dark: #001144;
    --primary-light: #1a2d7a;
    --background-color: #ffffff;
    --text-color: #000000;
    --text-light: #333333;
    --border-color: #e1e5e9;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-gray: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 0.75rem 0;
    box-shadow: 0 4px 20px rgba(1, 32, 102, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    height: 50px;
    width: auto;
    margin-right: 1rem;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.logo:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-main {
    font-size: 1.2rem;
    font-weight: 700;
}

.logo-sub {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 300;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    font-weight: 500;
}

.nav-menu a.active {
    background: rgba(255, 255, 255, 0.2);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
}

.user-info span {
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    opacity: 0.9;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 1rem;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
}

.card-header {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.card-title {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    background: linear-gradient(135deg, #012066, #4a90e2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.875rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(1, 32, 102, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

input::placeholder,
textarea::placeholder {
    color: #999;
    font-style: italic;
}

textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 3rem;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-secondary {
    background: #000000!important;
    color: white;
    border: 1px solid #060606;
}

.btn-secondary:hover {
    background: #000000!important;
    border-color: #000000;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #34ce57);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838, var(--success-color));
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #e74c3c);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333, var(--danger-color));
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #868e96);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #6c757d);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.3);
}

.btn-group {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
    margin-top: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

tbody tr:hover {
    background: linear-gradient(90deg, rgba(1, 32, 102, 0.02), rgba(74, 144, 226, 0.02));
}

th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
}

tbody tr {
    transition: all 0.3s ease;
}

tbody tr:hover {
    background: linear-gradient(90deg, rgba(1, 32, 102, 0.05), rgba(1, 32, 102, 0.02));
    transform: scale(1.01);
}

tbody tr:nth-child(even) {
    background: rgba(248, 249, 250, 0.5);
}

tbody tr:nth-child(even):hover {
    background: linear-gradient(90deg, rgba(1, 32, 102, 0.05), rgba(1, 32, 102, 0.02));
}

/* Dashboard Statistics Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(1, 32, 102, 0.15);
    color: white;
    position: relative;
    overflow: hidden;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
    display: block;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.stat-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 500;
    margin: 0;
}

.stat-icon {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.8);
    flex-shrink: 0;
}

/* Enhanced Badge Styles */
.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.badge-prospect {
    background: linear-gradient(135deg, var(--info-color), #20c997);
    color: white;
}

.badge-active {
    background: linear-gradient(135deg, var(--success-color), #34ce57);
    color: white;
}

.badge-inactive {
    background: linear-gradient(135deg, var(--warning-color), #ffcd39);
    color: #212529;
}

.badge-closed {
    background: linear-gradient(135deg, var(--danger-color), #e74c3c);
    color: white;
}

.badge-low {
    background: linear-gradient(135deg, #6c757d, #868e96);
    color: white;
}

.badge-medium {
    background: linear-gradient(135deg, var(--warning-color), #ffcd39);
    color: #212529;
}

.badge-high {
    background: linear-gradient(135deg, var(--danger-color), #e74c3c);
    color: white;
}

/* Search and Filter */
.search-filter {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-box {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.search-box input {
    padding-left: 3rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    transition: all 0.3s ease;
}

.search-box::before {
    content: '\f002';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    z-index: 1;
    opacity: 0.7;
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(1, 32, 102, 0.1);
    transform: translateY(-2px);
}

.filter-section {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-section select {
    min-width: 150px;
    border-radius: 25px;
    background: white;
}

/* Login Form Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 450px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo {
    height: 80px;
    width: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.login-title {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.login-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 300;
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: row!important;
        gap: 1rem;
    }
    .user-info {
    
    display: none!important;
}

    .nav-menu {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .search-filter {
        flex-direction: column;
    }

    .search-box {
        min-width: auto;
    }

    .btn-group {
        flex-direction: column;
    }

    .container {
        padding: 0 0.5rem;
    }

    .card {
        padding: 1rem;
    }

    .login-card {
        margin: 1rem;
        padding: 2rem;
    }

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .login-title {
        font-size: 1.5rem;
    }

    .card-title {
        font-size: 1.2rem;
    }

    th, td {
        padding: 0.5rem 0.25rem;
    }
}

/* Beautiful Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(1, 32, 102, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(1, 32, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(1, 32, 102, 0);
    }
}

.card {
    animation: fadeInUp 0.6s ease-out;
}

.stat-card {
    animation: fadeInUp 0.6s ease-out;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }

.btn-primary {
    animation: pulse 2s infinite;
}

.login-card {
    animation: fadeInUp 0.8s ease-out;
}

/* Page Load Animation */
body {
    animation: fadeInUp 0.5s ease-out;
}

/* Hover Glow Effects */
.glow-on-hover {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    transition: all 0.3s ease;
}

.glow-on-hover:hover {
    box-shadow: 0 0 20px rgba(1, 32, 102, 0.6), 0 0 40px rgba(1, 32, 102, 0.4);
}

/* Progress Indicators */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(1, 32, 102, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        padding: 1rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        display: flex;
    }
}
