/* Estilos personalizados para el Panel SmartTube Pro */

:root {
    --primary-gradient: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    --secondary-gradient: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    --teal-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --dark-bg: #131419;
    --card-bg: #1c1e23;
    --input-bg: #252830;
    --text-color: #e0e0e0;
    --accent-color: #00d2ff;
    
    /* Tipografía estandarizada - tamaños fijos */
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 28px;
}

/* Reset y base tipográfica */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
}

body {
    background-color: var(--dark-bg) !important;
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    font-size: var(--font-size-base);
    line-height: 1.5;
}

/* Títulos con tamaños exactos y sin cortes */
h1, .h1 { 
    font-size: var(--font-size-3xl) !important; 
    font-weight: 700; 
    margin-bottom: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

h2, .h2 { 
    font-size: var(--font-size-2xl) !important; 
    font-weight: 600; 
    margin-bottom: 0.875rem;
    word-wrap: break-word;
}

h3, .h3 { 
    font-size: var(--font-size-xl) !important; 
    font-weight: 600; 
    margin-bottom: 0.75rem; 
}

h4, .h4 { 
    font-size: var(--font-size-lg) !important; 
    font-weight: 600; 
    margin-bottom: 0.625rem; 
}

h5, .h5 { 
    font-size: var(--font-size-base) !important; 
    font-weight: 600; 
    margin-bottom: 0.5rem; 
}

h6, .h6 { 
    font-size: var(--font-size-sm) !important; 
    font-weight: 600; 
    margin-bottom: 0.5rem; 
}

/* Cards */
.ctcard, .card {
    background-color: var(--card-bg) !important;
    border: none !important;
    border-radius: 15px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    margin-bottom: 20px;
}

.card-header {
    background: var(--primary-gradient) !important;
    border-radius: 15px 15px 0 0 !important;
    padding: 16px 20px !important;
}

.card-header h4, .card-header .h4 {
    font-size: var(--font-size-lg) !important;
    font-weight: 600 !important;
    margin: 0 !important;
    letter-spacing: 0.3px;
    white-space: normal !important;
    word-wrap: break-word;
}

.card-body {
    padding: 20px !important;
}

/* Botones con tipografía consistente */
.btn {
    font-size: var(--font-size-sm) !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-lg {
    font-size: var(--font-size-base) !important;
    padding: 12px 24px !important;
}

.btn-sm {
    font-size: var(--font-size-xs) !important;
    padding: 6px 14px !important;
}

.btn-info, .btn-primary {
    background: var(--primary-gradient) !important;
    border: none !important;
    border-radius: 25px !important;
    padding: 10px 20px !important;
}

.btn-info:hover, .btn-primary:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 15px rgba(0, 114, 255, 0.4);
}

.btn-success {
    background: var(--teal-gradient) !important;
    border: none !important;
    border-radius: 25px !important;
}

.btn-danger {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%) !important;
    border: none !important;
    border-radius: 25px !important;
}

.btn-secondary {
    background: #3a3f4a !important;
    border: none !important;
    border-radius: 25px !important;
}

/* Formularios - CORREGIDO para legibilidad */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    font-size: var(--font-size-base) !important;
    font-weight: 500;
    color: #ccc !important;
    margin-bottom: 10px;
    display: block;
}

.form-control {
    background-color: var(--input-bg) !important;
    border: 1px solid #444 !important;
    border-radius: 10px !important;
    color: #fff !important;
    padding: 14px 16px !important;
    font-size: var(--font-size-base) !important;
    height: auto !important;
    min-height: 50px;
}

.form-control:focus {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.3) !important;
}

.form-control::placeholder {
    color: #777 !important;
    font-size: var(--font-size-sm) !important;
}

/* SELECT - CORREGIDO para mostrar texto completo */
select.form-control {
    cursor: pointer;
    padding-right: 40px !important;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23ffffff' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

select.form-control option {
    background-color: #1c1e23 !important;
    color: #fff !important;
    padding: 12px !important;
    font-size: var(--font-size-base) !important;
}

/* Dashboard Stats */
.stat-card {
    text-align: center;
    padding: 20px 15px;
}

.stat-value {
    font-size: var(--font-size-3xl) !important;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.stat-label {
    font-size: var(--font-size-xs) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.85;
    font-weight: 500;
}

.stat-total { color: #00d2ff; }
.stat-expired { color: #ff4b2b; }
.stat-warning { color: #f9d423; }

/* Tablas */
.table {
    color: var(--text-color) !important;
    font-size: var(--font-size-sm) !important;
}

.table thead th {
    border-top: none !important;
    border-bottom: 2px solid #333 !important;
    text-transform: uppercase;
    font-size: var(--font-size-xs) !important;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 12px 10px !important;
    color: #888;
}

.table td {
    border-top: 1px solid #2a2d35 !important;
    vertical-align: middle !important;
    padding: 14px 10px !important;
}

.table tbody tr:hover {
    background-color: rgba(0, 210, 255, 0.05);
}

.badge-expiry {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: var(--font-size-xs) !important;
    font-weight: 500;
}

/* Sidebar */
#sidebar-wrapper {
    background-color: #0f1014 !important;
    border-right: 1px solid #222 !important;
}

.sidebar-logo h5 {
    font-size: var(--font-size-sm) !important;
    font-weight: 600;
    letter-spacing: 0.5px;
}

#sidebar-wrapper .list-group-item {
    background-color: transparent !important;
    color: #888 !important;
    border: none !important;
    padding: 14px 20px !important;
    font-size: var(--font-size-sm) !important;
    font-weight: 500;
    transition: all 0.3s;
}

#sidebar-wrapper .list-group-item i {
    width: 20px;
    text-align: center;
}

#sidebar-wrapper .list-group-item:hover, 
#sidebar-wrapper .list-group-item.active {
    color: #fff !important;
    background: rgba(0, 210, 255, 0.1) !important;
    border-left: 4px solid var(--accent-color) !important;
}

/* Navbar */
.navbar {
    background-color: #0f1014 !important;
    border-bottom: 1px solid #222 !important;
    padding: 12px 20px !important;
}

.credits-badge {
    font-size: var(--font-size-sm) !important;
}

/* Modales */
.modal-content {
    border-radius: 15px !important;
}

.modal-header {
    padding: 18px 20px;
}

.modal-title {
    font-size: var(--font-size-lg) !important;
    font-weight: 600;
}

.modal-body {
    font-size: var(--font-size-base) !important;
    padding: 20px;
}

/* Input Group */
.input-group-text {
    font-size: var(--font-size-sm) !important;
}

/* Alertas */
.alert {
    font-size: var(--font-size-sm) !important;
    border-radius: 10px;
}

/* Jumbotron - CORREGIDO para mostrar texto completo */
.jumbotron {
    padding: 30px 20px !important;
    border-radius: 15px !important;
}

.jumbotron h2, 
.jumbotron .display-4,
.welcome-title {
    font-size: var(--font-size-2xl) !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    margin-bottom: 15px !important;
}

.jumbotron .lead {
    font-size: var(--font-size-base) !important;
    opacity: 0.85;
    line-height: 1.5;
}

/* Texto pequeño y muted */
small, .small, .text-muted {
    font-size: var(--font-size-xs) !important;
}

/* Checkboxes más grandes */
.user-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    :root {
        --font-size-3xl: 22px;
        --font-size-2xl: 20px;
        --font-size-xl: 18px;
        --font-size-lg: 16px;
        --font-size-base: 14px;
        --font-size-sm: 13px;
        --font-size-xs: 11px;
    }
    
    .stat-value {
        font-size: 22px !important;
    }
    
    .card-body {
        padding: 15px !important;
    }
    
    .jumbotron {
        padding: 20px 15px !important;
    }
    
    .jumbotron h2, 
    .jumbotron .display-4,
    .welcome-title {
        font-size: 20px !important;
    }
    
    .jumbotron .lead {
        font-size: 14px !important;
    }
    
    .btn-lg {
        font-size: 14px !important;
        padding: 10px 18px !important;
    }
    
    .form-group label {
        font-size: 14px !important;
    }
    
    .form-control {
        font-size: 14px !important;
        padding: 12px 14px !important;
        min-height: 45px;
    }
    
    /* Botones en columna en móvil */
    .jumbotron .d-flex {
        flex-direction: column;
    }
    
    .jumbotron .btn {
        margin: 5px 0 !important;
        width: 100%;
    }
}

/* Fix para textos largos */
.text-truncate-fix {
    white-space: normal !important;
    word-wrap: break-word !important;
}
