* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    color: #222;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background: #159437;
    color: #fff;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
}

.nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo {
    height: 42px;
    max-width: 160px;
    object-fit: contain;
    display: block;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.5rem 1rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    padding: 0.35rem 0;
}

.nav-links a:hover {
    text-decoration: underline;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #108210;
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        border-bottom: 1px solid rgba(255,255,255,0.2);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        display: block;
        padding: 0.75rem;
    }
}

.main-content {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

@media (max-width: 600px) {
    .main-content {
        padding: 1rem;
    }
}

.hero {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, #05952e 0%, #159895 100%);
    color: #fff;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: #1a5f7a;
}

.feature-card p {
    color: #555;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

@media (max-width: 500px) {
    .dashboard-cards {
        grid-template-columns: 1fr 1fr;
    }
}

.card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.card h3 {
    font-size: 1rem;
    color: #1a5f7a;
    margin-bottom: 0.5rem;
}

.card-count {
    font-size: 1.75rem;
    font-weight: 700;
    color: #159895;
}

.container {
    max-width: 420px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.auth-box {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.auth-box h1 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: #1a5f7a;
}

.auth-link {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.auth-link a {
    color: #1a5f7a;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #1a5f7a;
    box-shadow: 0 0 0 2px rgba(26,95,122,0.2);
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s;
}

.btn-primary {
    background: #1a5f7a;
    color: #fff;
}

.btn-primary:hover {
    background: #144d62;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
}

.btn-sm.active {
    background: #1a5f7a;
    color: #fff;
}

.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.booking-form {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    max-width: 640px;
}

.booking-form .form-group {
    margin-bottom: 1rem;
}

.booking-form .form-row {
    margin-bottom: 1rem;
}

.booking-form button {
    margin-top: 0.5rem;
}

.deals-selector {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    max-width: 640px;
}

.deal-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.deal-option {
    padding: 0.5rem 1rem;
    border: 2px solid #ddd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
}

.deal-option:hover,
.deal-option.active {
    border-color: #1a5f7a;
    background: #e8f4f8;
}

.selected-deal {
    font-weight: 500;
    color: #1a5f7a;
}

.subscribe-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.subscribe-form input {
    flex: 1;
    min-width: 180px;
}

.table-wrapper {
    overflow-x: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.75rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

@media (max-width: 600px) {
    .data-table th,
    .data-table td {
        padding: 0.5rem 0.35rem;
        font-size: 0.9rem;
    }
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #1a5f7a;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.badge-pending { background: #fff3cd; color: #856404; }
.badge-confirmed { background: #d4edda; color: #155724; }
.badge-cancelled { background: #f8d7da; color: #721c24; }
.badge-completed { background: #cce5ff; color: #004085; }
.badge-active { background: #d4edda; color: #155724; }
.badge-inactive { background: #e2e3e5; color: #383d41; }
.badge-unsubscribed { background: #f8d7da; color: #721c24; }
.badge-sent { background: #d4edda; color: #155724; }
.badge-failed { background: #f8d7da; color: #721c24; }
.badge-opened { background: #cce5ff; color: #004085; }
.badge-clicked { background: #d1ecf1; color: #0c5460; }
.badge-contact { background: #e2e3e5; }
.badge-new { background: #fff3cd; color: #856404; }
.badge-contacted { background: #cce5ff; color: #004085; }
.badge-converted { background: #d4edda; color: #155724; }
.badge-resolved { background: #d4edda; }
.badge-in_progress { background: #fff3cd; }
.badge-urgent { background: #f8d7da; }
.badge-high { background: #f8d7da; }
.badge-medium { background: #fff3cd; }
.badge-low { background: #e2e3e5; }

.filter-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filter-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filter-form input {
    padding: 0.5rem 0.75rem;
    max-width: 180px;
}

details.create-form {
    margin-bottom: 1.5rem;
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
}

details summary {
    cursor: pointer;
    font-weight: 600;
    color: #1a5f7a;
}

.chat-widget {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
}

.chat-toggle {
    background: #1a5f7a;
    color: #fff;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    min-height: 44px;
}

@media (max-width: 480px) {
    .chat-widget {
        bottom: 1rem;
        right: 1rem;
    }
}

.chat-toggle:hover {
    background: #144d62;
}

.chat-panel {
    position: absolute;
    bottom: 60px;
    right: 0;
    width: min(360px, calc(100vw - 2rem));
    max-height: min(480px, 70vh);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-panel.hidden {
    display: none;
}

.chat-header {
    background: #1a5f7a;
    color: #fff;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h4 {
    margin: 0;
}

.chat-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    min-height: 200px;
    max-height: 320px;
}

.chat-msg {
    margin-bottom: 0.75rem;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    max-width: 85%;
}

.chat-msg.user {
    background: #e8f4f8;
    margin-left: auto;
}

.chat-msg.bot {
    background: #f0f0f0;
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 0.5rem;
}

.chat-input-area input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.footer {
    text-align: center;
    padding: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.subscriber-count {
    margin-bottom: 1rem;
    color: #555;
}
