*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Paleta Premium - Esmeralda & Dourado */
    --bg-primary: #0a0f0d;
    --bg-secondary: #111916;
    --bg-card: rgba(17, 25, 22, 0.8);
    --bg-card-hover: rgba(24, 36, 31, 0.9);

    --accent-primary: #10b981;
    --accent-secondary: #34d399;
    --accent-tertiary: #6ee7b7;
    --accent-gold: #f59e0b;
    --accent-gold-light: #fbbf24;
    --accent-purple: #8b5cf6;

    --text-primary: #f0fdf4;
    --text-secondary: #a7f3d0;
    --text-muted: #6b7280;

    --border-subtle: rgba(16, 185, 129, 0.15);
    --border-active: rgba(16, 185, 129, 0.4);

    --shadow-glow: 0 0 60px rgba(16, 185, 129, 0.15);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    zoom: 0.9;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(139, 92, 246, 0.05) 0%, transparent 40%);
}

/* Scrollbar Personalizada */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-purple));
    border-radius: 10px;
}

/* OVERLAY DE LOGIN */
#login-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse 100% 60% at 50% 0%, rgba(16, 185, 129, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 80% 50% at 0% 100%, rgba(245, 158, 11, 0.08) 0%, transparent 40%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 48px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    box-shadow: var(--shadow-glow), var(--shadow-card);
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.login-logo svg {
    width: 48px;
    height: 48px;
}

.login-logo h1 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 32px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.input-group .input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: color 0.3s;
}

.input-group input:focus+.input-icon {
    color: var(--accent-primary);
}

.btn-primary {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--accent-primary), #059669);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:active {
    transform: translateY(0);
}

/* CONTEÚDO PRINCIPAL */
#main-content {
    display: none;
    height: 100vh;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR MENU */
.sidebar {
    width: 240px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-subtle);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 50;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 0 0 20px;
}

.sidebar-header h2 {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: opacity 0.2s;
}

.sidebar.collapsed .sidebar-header h2 {
    display: none;
}

.btn-toggle-sidebar {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-toggle-sidebar:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--accent-primary);
}

.bot-list {
    flex: 1;
    padding: 0 12px;
}

.bot-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.bot-item:hover {
    background: rgba(16, 185, 129, 0.08);
    color: var(--text-primary);
}

.bot-item.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(139, 92, 246, 0.1));
    color: var(--accent-primary);
    font-weight: 600;
}

.bot-item svg {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.bot-item.active svg {
    opacity: 1;
}

.bot-item span {
    transition: opacity 0.2s;
    white-space: nowrap;
}

.sidebar.collapsed .bot-item span {
    display: none;
}

.sidebar.collapsed .bot-item {
    justify-content: center;
    padding: 12px;
}

.add-bot-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 16px 12px;
    padding: 12px;
    background: transparent;
    border: 1px dashed var(--border-subtle);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
}

.sidebar.collapsed .add-bot-btn span {
    display: none;
}

.sidebar.collapsed .add-bot-btn {
    margin: 16px 12px;
    padding: 12px 0;
}

.add-bot-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(16, 185, 129, 0.05);
}

.main-area {
    flex: 1;
    padding: 32px;
    margin-left: 240px;
    min-height: 100vh;
    overflow-y: auto;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed+.main-area {
    margin-left: 80px;
}

@media (max-width: 1200px) {
    .main-grid {
        grid-template-columns: 1fr;
    }

    .form-card {
        position: static;
        margin-bottom: 24px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 240px !important;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-area {
        margin-left: 0 !important;
        padding: 20px;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
        margin-top: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .btn-mobile-menu {
        display: flex !important;
    }
}

.btn-mobile-menu {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-subtle);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-brand svg {
    width: 42px;
    height: 42px;
}

.header-brand h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.header-brand h1 span {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-brand .badge {
    display: inline-flex;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    border-radius: 20px;
    color: #0a0f0d;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(16, 185, 129, 0.05);
}

.btn-outline.danger:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

/* STATS CARDS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    padding: 24px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--border-active);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-primary);
}

.stat-icon.gold {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-gold);
}

.stat-icon.purple {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
}

.stat-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.stat-content p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* LAYOUT PRINCIPAL */
.main-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 32px;
}

@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

/* FORMULÁRIO */
.form-card {
    position: sticky;
    top: 32px;
    padding: 28px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    height: fit-content;
}

.form-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.form-title svg {
    color: var(--accent-primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.btn-generate {
    width: 100%;
    padding: 16px;
    margin-top: 8px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25), 0 4px 12px rgba(139, 92, 246, 0.2);
}

/* TABELA */
.table-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    overflow: hidden;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
}

.table-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-header h2 svg {
    color: var(--accent-gold);
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead tr {
    background: rgba(0, 0, 0, 0.3);
}

th {
    padding: 14px 20px;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

th:last-child {
    text-align: center;
}

tbody tr {
    border-top: 1px solid var(--border-subtle);
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: rgba(16, 185, 129, 0.03);
}

td {
    padding: 18px 20px;
    vertical-align: middle;
}

.key-cell {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-secondary);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-primary);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-badge.unused {
    background: rgba(107, 114, 128, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(107, 114, 128, 0.2);
}

.status-badge.expired {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.hwid-cell {
    max-width: 160px;
}

.hwid-cell .hwid-value {
    display: block;
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hwid-cell .expiry {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.7;
    margin-top: 4px;
}

.hwid-cell .expiry.perpetual {
    color: var(--accent-gold);
    opacity: 1;
}

.created-cell {
    white-space: nowrap;
}

.created-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.action-cell {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-action {
    padding: 8px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--accent-primary);
}

.btn-action.copy:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    color: var(--accent-purple);
}

.btn-action.view:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--accent-gold);
}

.btn-action.delete:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.btn-action.edit:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

.key-hidden {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 2px;
}

.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* SMS DASHBOARD STYLES */
#sms-app {
    display: none;
    flex-direction: column;
    gap: 24px;
    height: calc(100vh - 160px);
}

.sms-container {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 16px;
    height: 100%;
    min-height: 500px;
}

.sms-controls {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    backdrop-filter: blur(10px);
}

.sms-chat {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.chat-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
}

.message.system {
    align-self: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
    border-radius: 8px;
    padding: 6px 12px;
}

.message.received {
    align-self: flex-start;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.message.sent {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--accent-primary), #059669);
    color: white;
    border-bottom-right-radius: 4px;
}

.msg-time {
    display: block;
    font-size: 0.7rem;
    opacity: 0.5;
    margin-top: 4px;
}

.sms-balance {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sms-balance-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    margin-bottom: 8px;
}

.sms-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent-gold);
}

.btn-refresh-balance {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-refresh-balance:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: rotate(180deg);
}

.btn-refresh-balance:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

.sms-timer {
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
    margin: 10px 0;
    letter-spacing: -0.05em;
}

.toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-container:hover {
    background: rgba(16, 185, 129, 0.08);
    border-color: var(--accent-primary);
}

.toggle-container.active {
    background: rgba(16, 185, 129, 0.05);
    border-color: var(--accent-primary);
}

.toggle-container.active .toggle-switch {
    background: var(--accent-primary);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.toggle-container.active .toggle-switch::after {
    left: 22px;
}

.toggle-switch {
    width: 44px;
    height: 24px;
    background: #374151;
    border-radius: 12px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.active-controls-card {
    background: rgba(16, 185, 129, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 16px;
    animation: fadeIn 0.4s ease-out;
}

.btn-copy-small {
    padding: 6px 10px;
    font-size: 0.7rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy-small:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    background: rgba(16, 185, 129, 0.1);
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-switch.header-toggle {
    width: 32px;
    height: 18px;
}

.toggle-switch.header-toggle::after {
    width: 14px;
    height: 14px;
    top: 2px;
    left: 2px;
}

.toggle-container.active .toggle-switch.header-toggle::after {
    left: 16px;
}

.toggle-container.active .toggle-switch::after {
    left: 22px;
}

.number-info {
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
}

.number-info strong {
    display: block;
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.number-info span {
    font-size: 1rem;
    font-weight: 800;
    color: var(--accent-primary);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.02em;
}

/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.modal-overlay.visible {
    display: flex;
}

.modal-card {
    width: 100%;
    max-width: 480px;
    padding: 32px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    box-shadow: var(--shadow-glow), var(--shadow-card);
    animation: fadeIn 0.2s ease-out;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.modal-header svg {
    width: 28px;
    height: 28px;
    color: var(--accent-gold);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-body {
    margin-bottom: 24px;
}

.modal-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.key-display {
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9rem;
    color: var(--accent-secondary);
    word-break: break-all;
    text-align: center;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions button {
    flex: 1;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-modal-cancel {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
}

.btn-modal-cancel:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.btn-modal-confirm {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    border: none;
    color: #0a0f0d;
}

.btn-modal-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.btn-modal-copy {
    background: linear-gradient(135deg, var(--accent-purple), #7c3aed);
    border: none;
    color: white;
}

.btn-modal-copy:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

/* LOGS */
.logs-container {
    margin-top: 32px;
    display: none;
}

.logs-container.visible {
    display: block;
}

.logs-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 24px;
}

.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.logs-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.logs-header h3 svg {
    color: var(--accent-gold);
}

.btn-refresh {
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-refresh:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.logs-content {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--text-muted);
    white-space: pre-wrap;
    word-break: break-all;
}

/* TOAST */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    z-index: 200;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.toast.success {
    border: 1px solid var(--accent-primary);
}

.toast.error {
    border: 1px solid #ef4444;
}

.toast svg {
    width: 20px;
    height: 20px;
}

.toast.success svg {
    color: var(--accent-primary);
}

.toast.error svg {
    color: #ef4444;
}

/* ANIMAÇÕES */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* NOVO: Saldo SMS no cabeçalho */
.header-balance-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid var(--border-subtle);
    padding: 6px 14px;
    border-radius: 12px;
    margin-right: 12px;
    transition: all 0.3s ease;
}

.header-balance-container:hover {
    background: rgba(16, 185, 129, 0.12);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}

.header-balance {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.balance-label {
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    line-height: 1;
    margin-bottom: 2px;
}

.balance-value {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--accent-gold);
    line-height: 1;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.btn-balance-refresh {
    background: transparent;
    border: none;
    color: var(--accent-primary);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0.7;
}

.btn-balance-refresh:hover {
    opacity: 1;
    background: rgba(16, 185, 129, 0.1);
    transform: rotate(30deg);
}

.btn-balance-refresh.loading svg {
    animation: spin 1s linear infinite;
}

/* Histórico SMS */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.history-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
}

.history-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-number {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.history-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.history-status {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.history-status.finished {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-primary);
}

.history-status.cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 8px;
    transition: color 0.2s;
}

.btn-close-modal:hover {
    color: var(--text-primary);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* SMS SESSIONS LAYOUT */
.sms-layout {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.sms-sidebar {
    width: 260px;
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
}

.sms-sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sms-sidebar-header h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.btn-icon-small {
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon-small:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--accent-primary);
}

.sms-sessions-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.sms-session-item {
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 6px;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s;
    position: relative;
    display: block;
}

.sms-session-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.sms-session-item.active {
    background: rgba(16, 185, 129, 0.08);
    /* Mais sutil que o anterior */
    border-color: var(--border-subtle);
}

.sms-session-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

.sms-session-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sms-session-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    display: inline-block;
}

.sms-session-item.has-active .sms-session-status-dot {
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
}

.btn-delete-session {
    position: absolute;
    right: 8px;
    top: 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    opacity: 0;
    cursor: pointer;
    transition: opacity 0.2s;
    padding: 4px;
}

.sms-session-item:hover .btn-delete-session {
    opacity: 1;
}

.btn-delete-session:hover {
    color: #ef4444;
}

.sms-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--bg-card);
    /* Ensure background is set */
}

/* Ensure sms-container takes full height in this new layout */
#sms-app .sms-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column-reverse;
    /* Controles embaixo por padrão */
    gap: 16px;
}

/* Empty state for main area */
.sms-no-session {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
    gap: 16px;
}

/* === FOCUS MODE STYLES === */
.btn-focus-mode {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--border-subtle);
    color: var(--accent-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-focus-mode:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.btn-focus-mode.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

/* Focus Mode - Full Screen SMS */
body.focus-mode .sidebar,
body.focus-mode .main-header,
body.focus-mode .sms-sidebar {
    display: none !important;
}

body.focus-mode .main-area {
    margin-left: 0 !important;
    padding: 16px !important;
}

body.focus-mode #sms-app {
    height: calc(100vh - 32px) !important;
    padding: 0 !important;
}

body.focus-mode .sms-layout {
    display: block;
    height: 100%;
}

body.focus-mode .sms-main {
    width: 100%;
    height: 100%;
}

body.focus-mode .sms-container {
    height: 100% !important;
    display: flex !important;
    flex-direction: column-reverse !important;
    gap: 16px;
}

body.focus-mode .sms-controls {
    position: relative;
    width: 100%;
    max-height: none;
    flex-shrink: 0;
    border-radius: 16px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
}

body.focus-mode .sms-controls .form-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    flex: 0 0 auto;
}

body.focus-mode .sms-controls>div:nth-child(2) {
    flex: 0 0 auto;
}

body.focus-mode .sms-controls .active-controls-card {
    /* Mantém o estilo do foco, mas agora o padrão também será parecido */
    gap: 24px;
}

/* === Novos Controles SMS (Design High-Fidelity) === */

.active-controls-card {
    display: flex;
    align-items: center;
    gap: 0;
    /* Controle via margins/paddings internos */
    width: 100%;
    height: 60px;
    /* Altura fixa para consistência */
}

/* Base Stat Box */
.sms-stat-box {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Number Card Específico */
.number-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 0 16px;
    height: 50px;
    /* Levemente menor que o container total */
    display: flex;
    gap: 16px;
}

.stat-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.number-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
}

.country-code {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.number-val {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Separador Vertical Fino dentro do Card */
.vert-sep {
    width: 1px;
    height: 24px;
    background: var(--border-subtle);
    opacity: 0.5;
}

/* Pill Buttons */
.btn-pill {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-pill.active {
    background: var(--accent-primary);
    color: #000;
    /* Texto escuro no verde fica melhor */
    font-weight: 700;
}

/* Groups Separator (Espaço + Linha Vertical opcional se quiser) */
.group-sep {
    width: 1px;
    height: 32px;
    background: var(--border-subtle);
    margin: 0 24px;
    opacity: 0.3;
}

/* Timer Boxes */
.timer-box {
    gap: 12px;
}

.icon-circle {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
}

.icon-circle.orange {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}

.icon-circle.teal {
    background: rgba(20, 184, 166, 0.15);
    color: #14b8a6;
}

.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-value.orange {
    color: #f97316;
}

.stat-value.teal {
    color: #14b8a6;
}


/* Action Buttons */
.action-buttons-group {
    display: flex;
    gap: 12px;
}

.btn-cancel-session {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel-session:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

.btn-maximize-session {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--accent-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-maximize-session:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--accent-primary);
}

#sms-timer,
#elapsed-timer {
    font-size: 1.5rem !important;
    /* Menor que antes */
    margin: 0 !important;
}

.timer-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Chat flex fix */
.sms-chat {
    flex: 1;
    /* Ocupar todo espaço vertical disponível */
    display: flex;
    flex-direction: column;
    min-height: 0;
    /* Necessário para scroll interno */
    overflow: hidden;
}

/* Sidebar Toggle Styles */
.sms-layout.sidebar-hidden .sms-sidebar {
    display: none;
}

/* Header Compacto */
.sms-controls .form-title {
    margin-bottom: 0px !important;
    padding-bottom: 8px;
    min-height: 40px;
    /* Mais compacto */
}

/* Aba Lateral de Toggle - Estilo Vertical */
.sidebar-toggle-tab {
    position: absolute;
    left: 0;
    top: 100px;
    /* Movido para cima conforme pedido */
    transform: none;
    /* Remove vertical center */
    z-index: 100;
    width: 24px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
    border-left: none;
    /* Grudado na esquerda */
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-buy-session {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-buy-session:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
}

.sidebar-toggle-tab:hover {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-primary);
    width: 32px;
}

.sidebar-toggle-tab svg {
    transition: transform 0.3s ease;
    transform: scale(0.7);
    /* Reduz em 30% */
}

/* Rotação quando escondido (mantendo o scale) */
.sms-layout.sidebar-hidden .sidebar-toggle-tab svg {
    transform: scale(0.7) rotate(180deg);
}

.sms-layout.sidebar-hidden .sidebar-toggle-tab {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

body.focus-mode .sms-chat {
    flex: 1;
    min-height: 0;
    border-radius: 16px;
}

body.focus-mode .btn-focus-mode {
    background: var(--accent-primary);
    color: white;
}

body.focus-mode .btn-focus-mode svg,
.btn-focus-mode.active svg {
    stroke: white !important;
}

/* Saldo no modo foco */
.focus-balance {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.focus-balance .balance-label {
    opacity: 0.7;
    margin-right: 2px;
}

body.focus-mode #focus-mode-balance {
    display: flex !important;
    align-items: center;
    gap: 4px;
}

/* === New Unified SMS Controls (Adaptive) === */
.sms-unified-controls {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 60px;
    height: auto;
    /* Allow growth */
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    padding: 8px 16px;
    gap: 16px;
    transition: all 0.3s ease;
    flex-wrap: nowrap;
    /* Default: row */
}

/* Items inside the bar */
.sms-control-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    /* Allows shrinking */
}

/* IDLE State Styling */
.sms-idle-state {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-buy-hero {
    flex: 1;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    height: 48px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-buy-hero:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* ACTIVE State Styling */
.sms-number-display {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.sms-number-display .country {
    color: var(--accent-primary);
}

.sms-timer-display {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: #f97316;
    font-size: 0.75rem;
    /* 1rem -> 0.75rem */
    display: flex;
    align-items: center;
    gap: 5px;
    /* 8px -> 5px */
    background: rgba(249, 115, 22, 0.1);
    padding: 3px 8px;
    /* 6px 12px -> 3px 8px */
    border-radius: 6px;
    border: 1px solid rgba(249, 115, 22, 0.2);
    height: 28px;
    /* Force compact height */
}

/* Force specific SVG size for timers */
.sms-timer-display svg {
    width: 12px !important;
    height: 12px !important;
}

/* Compact Actions */
.sms-actions-end {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.btn-control-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-control-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-control-icon.danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
}

.btn-control-icon.success:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #10b981;
}

/* === ADAPTIVE LAYOUT (Compact/Mobile) === */
@media (max-width: 1400px) {
    .sms-unified-controls {
        flex-wrap: wrap !important;
        height: auto !important;
        padding: 12px 16px !important;
        gap: 12px !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }

    .sms-active-state {
        flex-wrap: wrap !important;
        width: 100%;
        gap: 8px !important;
    }

    /* === ROW 1: Number + Copy === */
    .sms-control-item:first-child {
        flex: 1 1 100% !important;
        /* Force Full Width */
        width: 100% !important;
        max-width: 100% !important;
        order: 1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        /* Clean separator */
        padding-bottom: 12px;
        margin-bottom: 4px;
    }

    .sms-number-display {
        width: 100%;
        font-size: 1.1rem;
    }

    .copy-group {
        margin-left: auto;
    }

    /* === ROW 2: Timers (Left) + Actions (Right) === */
    .sms-control-item:nth-child(2) {
        order: 2;
        flex: 1 1 auto !important;
        /* Grow to fill space */
        min-width: 0;
        margin: 0;
        align-items: flex-start;
        /* Align timers to left */
    }

    .sms-actions-end {
        order: 3;
        flex: 0 0 auto !important;
        /* Do not grow */
        margin-left: 12px;
    }

    /* Adjust specific elements for small screens */
    .sms-timer-display {
        font-size: 0.7rem;
        padding: 4px 8px;
    }

    .btn-control-icon {
        width: 36px;
        height: 36px;
    }
}