/* ============================================
   SMS Panel — Premium Custom Styles
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

/* ---- CSS Variables ---- */
:root {
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-danger: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    --gradient-warning: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
    --gradient-info: linear-gradient(135deg, #2196f3 0%, #21cbf3 100%);
    --gradient-pink: linear-gradient(135deg, #ee5a6f 0%, #f09819 100%);
    --gradient-purple: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-teal: linear-gradient(135deg, #0cebeb 0%, #20e3b2 50%, #29ffc6 100%);
    --gradient-dark: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.25);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.12);
    --border-radius: 16px;
    --border-radius-sm: 10px;
}

/* ---- Global ---- */
body {
    font-family: 'Inter', sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6,
.header-title {
    font-family: 'Poppins', sans-serif;
}

/* ---- Page fade-in animation ---- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-page .content {
    animation: fadeInUp 0.5s ease-out;
}

/* ---- Gradient Stat Cards ---- */
.card.widget-flat {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
    color: #fff;
}

.card.widget-flat::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    transition: transform 0.5s ease;
}

.card.widget-flat:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.card.widget-flat:hover::before {
    transform: scale(1.5);
}

.card.widget-flat .widget-icon {
    font-size: 2.5rem;
    opacity: 0.4;
}

.card.widget-flat h2,
.card.widget-flat h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

/* Gradient variants */
.card.widget-flat.text-bg-pink,
.card.widget-flat.gradient-pink {
    background: var(--gradient-pink) !important;
}

.card.widget-flat.text-bg-purple,
.card.widget-flat.gradient-purple {
    background: var(--gradient-purple) !important;
}

.card.widget-flat.gradient-success {
    background: var(--gradient-success) !important;
}

.card.widget-flat.gradient-info {
    background: var(--gradient-info) !important;
}

.card.widget-flat.gradient-teal {
    background: var(--gradient-teal) !important;
    color: #1a1a2e;
}

.card.widget-flat.gradient-warning {
    background: var(--gradient-warning) !important;
    color: #1a1a2e;
}

/* ---- Cards ---- */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: transparent;
    padding: 1.25rem 1.5rem;
}

.card-header .header-title {
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header .header-title i {
    font-size: 1.25rem;
    opacity: 0.7;
}

/* ---- Status Badges ---- */
.badge-success-soft {
    background: rgba(17, 153, 142, 0.15);
    color: #11998e;
    font-weight: 600;
    padding: 0.4em 0.8em;
    border-radius: 6px;
    font-size: 0.8rem;
}

.badge-error-soft {
    background: rgba(235, 51, 73, 0.15);
    color: #eb3349;
    font-weight: 600;
    padding: 0.4em 0.8em;
    border-radius: 6px;
    font-size: 0.8rem;
}

.badge-pending-soft {
    background: rgba(247, 151, 30, 0.15);
    color: #f7971e;
    font-weight: 600;
    padding: 0.4em 0.8em;
    border-radius: 6px;
    font-size: 0.8rem;
}

/* ---- Tables ---- */
.table thead th {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    border-bottom: 2px solid #f0f0f0;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.04) !important;
}

/* ---- Forms ---- */
.form-control,
.form-select {
    border-radius: var(--border-radius-sm);
    border: 1.5px solid #e2e8f0;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: #475569;
    margin-bottom: 0.4rem;
}

/* ---- Buttons ---- */
.btn-gradient-primary {
    background: var(--gradient-primary);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: var(--border-radius-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    letter-spacing: 0.3px;
}

.btn-gradient-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.35);
    color: #fff;
}

.btn-gradient-success {
    background: var(--gradient-success);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: var(--border-radius-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-gradient-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(17, 153, 142, 0.35);
    color: #fff;
}

/* ---- Login / Auth Pages ---- */
.auth-gradient-bg {
    background: var(--gradient-dark);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.auth-gradient-bg::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -30%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3), transparent 70%);
    animation: floatBlob1 8s ease-in-out infinite;
}

.auth-gradient-bg::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -30%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.3), transparent 70%);
    animation: floatBlob2 10s ease-in-out infinite;
}

@keyframes floatBlob1 {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(50px, 30px);
    }
}

@keyframes floatBlob2 {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-40px, -20px);
    }
}

.auth-glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.auth-glass-card .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: var(--border-radius-sm);
}

.auth-glass-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.auth-glass-card .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    color: #fff;
}

.auth-glass-card .form-label {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.auth-glass-card h4 {
    color: #fff;
}

.auth-glass-card .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* ---- Code Blocks (API Help) ---- */
.code-block-dark {
    background: #1e1e2e;
    color: #cdd6f4;
    border-radius: var(--border-radius-sm);
    padding: 1.25rem;
    font-family: 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
    position: relative;
    border: 1px solid #313244;
}

.code-block-dark .code-keyword {
    color: #cba6f7;
}

.code-block-dark .code-string {
    color: #a6e3a1;
}

.code-block-dark .code-number {
    color: #fab387;
}

.code-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cdd6f4;
    border-radius: 6px;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ---- Topup Quick Amounts ---- */
.quick-amount-btn {
    background: rgba(102, 126, 234, 0.1);
    border: 1.5px solid rgba(102, 126, 234, 0.3);
    color: #667eea;
    font-weight: 600;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.quick-amount-btn:hover,
.quick-amount-btn.active {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
}

/* ---- Balance Badge ---- */
.balance-badge {
    background: var(--gradient-success);
    color: #fff;
    font-weight: 700;
    font-size: 1.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    display: inline-block;
    box-shadow: 0 4px 16px rgba(17, 153, 142, 0.3);
    font-family: 'Poppins', sans-serif;
}

/* ---- Profile / Settings ---- */
.profile-banner-gradient {
    background: var(--gradient-primary);
    height: 180px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    position: relative;
}

.profile-avatar-wrapper {
    position: relative;
    margin-top: -60px;
    text-align: center;
}

.profile-avatar-wrapper img {
    border: 4px solid #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ---- API Key Field ---- */
.api-key-field {
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: var(--border-radius-sm);
    padding: 0.7rem 1rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.api-key-field .copy-btn {
    background: var(--gradient-primary);
    border: none;
    color: #fff;
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.api-key-field .copy-btn:hover {
    transform: scale(1.05);
}

/* ---- Send Message Card ---- */
.send-msg-card {
    max-width: 520px;
    margin: 2rem auto;
    border-radius: var(--border-radius);
}

.send-msg-card .card-header {
    background: var(--gradient-primary);
    color: #fff;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 1.5rem;
    text-align: center;
}

.send-msg-card .card-header .header-title {
    color: #fff;
    justify-content: center;
    font-size: 1.25rem;
}

/* ---- Topup Card ---- */
.topup-card {
    max-width: 520px;
    margin: 2rem auto;
    border-radius: var(--border-radius);
}

/* ---- Alert Styles ---- */
.alert-modern-success {
    background: rgba(17, 153, 142, 0.1);
    border: 1px solid rgba(17, 153, 142, 0.3);
    color: #11998e;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
}

.alert-modern-danger {
    background: rgba(235, 51, 73, 0.1);
    border: 1px solid rgba(235, 51, 73, 0.3);
    color: #eb3349;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
}

/* ---- Page Title ---- */
.page-title-box {
    padding: 1rem 0;
}

.page-title-box h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

/* ---- Input Group Icons ---- */
.input-icon-group {
    position: relative;
}

.input-icon-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
    z-index: 2;
}

.input-icon-group .form-control {
    padding-left: 2.75rem;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ---- Left Sidebar ---- */
.leftside-menu {
    font-family: 'Inter', sans-serif;
}

.sidebar-user-box {
    padding: 0.75rem 1rem;
}

.sidebar-user-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: #e2e8f0;
    letter-spacing: 0.2px;
}

.sidebar-divider {
    border-color: rgba(255, 255, 255, 0.08);
    margin: 0.25rem 1rem;
}

.side-nav .side-nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 10px;
    margin: 2px 10px;
    padding: 0.6rem 0.9rem;
    transition: all 0.25s ease;
    position: relative;
}

.side-nav .side-nav-link i {
    font-size: 1.2rem;
    width: 28px;
    text-align: center;
}

.side-nav .side-nav-link:hover {
    background: rgba(102, 126, 234, 0.12);
    color: #a5b4fc;
}

.side-nav .side-nav-link.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.15));
    color: #a5b4fc;
    font-weight: 600;
}

.side-nav .side-nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 3px;
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 0 4px 4px 0;
}

.side-nav-second-level a {
    font-size: 0.85rem;
    padding: 0.4rem 0.9rem 0.4rem 2.5rem;
    border-radius: 8px;
    margin: 1px 10px;
    transition: all 0.2s ease;
}

.side-nav-second-level a:hover,
.side-nav-second-level a.active {
    background: rgba(102, 126, 234, 0.1);
    color: #a5b4fc;
}

.side-nav-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 0.5rem 1.25rem;
    opacity: 0.5;
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: auto;
}

.sidebar-logout-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.sidebar-logout-btn:hover {
    color: #eb3349;
    background: rgba(235, 51, 73, 0.1);
}