* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-brand {
    padding: 1rem 0;
}

.nav-brand .brand-link {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
    transition: opacity 0.3s;
}

.nav-brand .brand-link:hover {
    opacity: 0.9;
}

.brand-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.nav-brand i {
    font-size: 1.8rem;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.nav-menu > li {
    position: relative;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 1.25rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    font-weight: 500;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    border-bottom-color: #3498db;
}

.nav-link i {
    font-size: 1.1rem;
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.dropdown-arrow {
    font-size: 0.75rem;
    margin-left: 0.25rem;
    transition: transform 0.3s;
}

.nav-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1001;
}

.nav-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    color: #2c3e50;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.dropdown-menu a:hover {
    background-color: #f8f9fa;
    color: #3498db;
    padding-left: 1.5rem;
}

.dropdown-menu i {
    width: 20px;
    color: #3498db;
}

/* Main Content */
.main-content {
    background-color: white;
    margin: 2.5rem auto;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    min-height: calc(100vh - 300px);
}

h2 {
    color: #1e3c72;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 4px solid #3498db;
    font-size: 2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

h2 i {
    color: #3498db;
}

h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

label i {
    color: #3498db;
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="datetime-local"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background-color: #f8f9fa;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
    background-color: white;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    margin-right: 0.75rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn i {
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7a7b 100%);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin-top: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

thead {
    background-color: #2c3e50;
    color: white;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

tbody tr:hover {
    background-color: #f8f9fa;
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e8ecf1;
    transition: all 0.3s;
}

.card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.card-header {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #3498db;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-header i {
    color: #3498db;
    font-size: 1.4rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.stat-card h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: white;
}

.stat-card p {
    font-size: 1rem;
    opacity: 0.95;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

/* Section Dividers */
.section-divider {
    border-top: 2px solid #e8ecf1;
    margin: 2.5rem 0;
    padding-top: 2rem;
}

.section-title {
    font-size: 1.3rem;
    color: #1e3c72;
    margin: 2rem 0 1.25rem 0;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 1rem;
    border-left: 4px solid #3498db;
}

.section-title i {
    color: #3498db;
}

/* Links */
a.link {
    color: #3498db;
    text-decoration: none;
}

a.link:hover {
    text-decoration: underline;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-active {
    background-color: #d4edda;
    color: #155724;
}

.badge-prospect {
    background-color: #d1ecf1;
    color: #0c5460;
}

.badge-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-closed {
    background-color: #d6d8db;
    color: #383d41;
}

.badge-pending {
    background-color: #fff3cd;
    color: #856404;
}

.badge-in-progress,
.badge-in.progress {
    background-color: #cce5ff;
    color: #004085;
}

.badge-completed {
    background-color: #d4edda;
    color: #155724;
}

.badge-expired {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-suspended {
    background-color: #f5c2c7;
    color: #842029;
}

/* Responsive */
@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: block;
    }

    .brand-logo {
        height: 40px;
    }

    .nav-brand .brand-link {
        font-size: 1.2rem;
        gap: 0.5rem;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 280px;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 1rem 0;
        box-shadow: 2px 0 15px rgba(0,0,0,0.1);
        transition: left 0.3s;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        color: #2c3e50;
        border-bottom: 1px solid #e8ecf1;
        padding: 1rem 1.5rem;
    }

    .nav-link:hover {
        background-color: #f8f9fa;
        border-bottom-color: #e8ecf1;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #f8f9fa;
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s;
    }

    .nav-dropdown.active .dropdown-menu {
        max-height: 500px;
    }

    .dropdown-menu a {
        padding-left: 3rem;
    }

    .main-content {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }

    h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 800px;
    }
}

@media (max-width: 480px) {
    .brand-logo {
        height: 35px;
    }

    .nav-brand .brand-link {
        font-size: 1rem;
    }

    .main-content {
        padding: 1rem;
        margin: 1rem auto;
        border-radius: 8px;
    }

    .card {
        padding: 1.25rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .btn {
        width: 100%;
        margin-right: 0;
    }
}
