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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --accent: #0ea5e9;
    --accent-dark: #0284c7;
    --bg-dark: #0f172a;
    --bg-darker: #050c1a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: #334155;
    --success: #10b981;
    --danger: #ef4444;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 50%, #1a1f35 100%);
    z-index: -1;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* ===== HEADER ===== */
.header {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.logo-section h1 {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.logo-section p {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-links {
    display: flex;
    gap: 12px;
}

.nav-links a {
    padding: 11px 22px;
    background: var(--surface);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.nav-links a.nav-active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.4);
}

.nav-links a:hover:not(.nav-active) {
    background: var(--surface-light);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* ===== DASHBOARD GRID ===== */
.dashboard {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 28px;
}

/* ===== CARDS ===== */
.input-card,
.buttons-section,
.message-preview,
.calllog-form-card,
.calllog-history {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
}

.input-card:hover,
.buttons-section:hover {
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.15);
}

.input-card h2,
.buttons-section h2,
.calllog-form-card h2,
.calllog-history h2,
.message-preview h3 {
    color: var(--text-primary);
    font-size: 1.35rem;
    margin-bottom: 24px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.message-preview h3 {
    font-size: 1.1rem;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: capitalize;
    letter-spacing: 0.2px;
}

.input-field {
    width: 100%;
    padding: 13px 18px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-primary);
}

.input-field::placeholder {
    color: var(--text-muted);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: rgba(15, 23, 42, 0.7);
}

.input-field:hover {
    border-color: var(--primary);
}

/* ===== BUTTON GROUPS ===== */
.button-group {
    margin-bottom: 32px;
}

.button-group:last-child {
    margin-bottom: 0;
}

.button-group h3 {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1.5px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

/* ===== ACTION BUTTONS ===== */
.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 15px 18px;
    margin-bottom: 11px;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    border: 1.5px solid transparent;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.4s ease;
    z-index: 0;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn span {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-btn .icon {
    font-size: 1.35rem;
    display: flex;
    align-items: center;
}

.action-btn .label {
    flex: 1;
    text-align: center;
    font-weight: 600;
}

.action-btn.general {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--text-primary);
}

.action-btn.general:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(14, 165, 233, 0.35);
}

.action-btn.office {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-primary);
}

.action-btn.office:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.35);
}

.action-btn.visa {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: var(--text-primary);
}

.action-btn.visa:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.35);
}

.action-btn:active {
    transform: translateY(-2px);
}

.action-btn.selected {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3), 0 12px 30px rgba(99, 102, 241, 0.4);
    transform: scale(1.01) translateY(-2px);
}

/* ===== MESSAGE PREVIEW ===== */
.message-preview {
    margin-bottom: 32px;
}

.preview-content {
    background: rgba(15, 23, 42, 0.7);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-secondary);
    font-family: 'Segoe UI', monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 18px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.copy-btn {
    width: 100%;
    padding: 15px 18px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--text-primary);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.copy-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.4);
}

.copy-btn:active {
    transform: translateY(-1px);
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    color: var(--text-muted);
    padding: 24px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 28px;
}

/* ===== RESPONSIVE - TABLET ===== */
@media (max-width: 1024px) {
    .header {
        padding: 28px;
        gap: 24px;
    }

    .logo-section h1 {
        font-size: 1.5rem;
    }

    .dashboard {
        gap: 24px;
    }

    .button-group {
        margin-bottom: 28px;
    }

    .action-btn {
        padding: 13px 16px;
        font-size: 0.9rem;
    }
}

/* ===== RESPONSIVE - MOBILE (768px) ===== */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    .header {
        flex-direction: column;
        text-align: center;
        padding: 24px;
        margin-bottom: 24px;
        gap: 16px;
    }

    .logo-section h1 {
        font-size: 1.5rem;
    }

    .logo-section p {
        font-size: 0.9rem;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
    }

    .nav-links a {
        flex: 1;
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .input-card,
    .buttons-section,
    .message-preview {
        padding: 24px;
    }

    .input-card h2,
    .buttons-section h2,
    .message-preview h3 {
        font-size: 1.15rem;
        margin-bottom: 20px;
    }

    .button-group h3 {
        font-size: 0.8rem;
        margin-bottom: 14px;
    }

    .action-btn {
        padding: 12px 14px;
        font-size: 0.85rem;
        margin-bottom: 9px;
    }

    .action-btn .icon {
        font-size: 1.2rem;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .input-field {
        padding: 11px 14px;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .preview-content {
        font-size: 0.85rem;
        padding: 16px;
        max-height: 200px;
        border-radius: 10px;
    }

    .copy-btn {
        padding: 12px 14px;
        font-size: 0.85rem;
        border-radius: 10px;
    }
}

/* ===== RESPONSIVE - SMALL MOBILE (480px) ===== */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .header {
        padding: 20px;
        margin-bottom: 18px;
    }

    .logo-section h1 {
        font-size: 1.35rem;
    }

    .logo-section p {
        font-size: 0.85rem;
    }

    .nav-links a {
        padding: 9px 10px;
        font-size: 0.75rem;
    }

    .input-card,
    .buttons-section,
    .message-preview {
        padding: 20px;
        margin-bottom: 16px;
    }

    .input-card h2,
    .buttons-section h2,
    .message-preview h3 {
        font-size: 1.1rem;
        margin-bottom: 16px;
    }

    .button-group {
        margin-bottom: 20px;
    }

    .button-group h3 {
        font-size: 0.75rem;
        margin-bottom: 12px;
    }

    .action-btn {
        padding: 11px 12px;
        font-size: 0.8rem;
        margin-bottom: 8px;
        border-radius: 10px;
    }

    .action-btn .icon {
        font-size: 1.15rem;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .input-field {
        padding: 10px 12px;
        font-size: 0.85rem;
        border-radius: 10px;
    }

    .preview-content {
        font-size: 0.8rem;
        padding: 14px;
        max-height: 140px;
        line-height: 1.6;
    }

    .copy-btn {
        padding: 11px 12px;
        font-size: 0.8rem;
        border-radius: 10px;
    }

    .footer {
        margin-top: 20px;
        padding: 16px;
        font-size: 0.85rem;
    }
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ===== ANIMATIONS ===== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-card,
.buttons-section,
.message-preview {
    animation: slideIn 0.5s ease-out forwards;
}

.input-card {
    animation-delay: 0.1s;
}

.buttons-section {
    animation-delay: 0.2s;
}

.message-preview {
    animation-delay: 0.3s;
}
