/* ==========================================
   COMMON CSS - Tüm Temalar İçin Ortak Stiller
   Bu dosya tema-bağımsız bileşen stilleri içerir
   ========================================== */

/* ===== BASE RESET ===== */
html { scroll-behavior: smooth; }
::selection { background: rgba(233,30,99,0.15); color: inherit; }

/* ===== CONTAINER ===== */
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ===== DASHBOARD SECTION ===== */
.dashboard-section {
    padding: 30px 0 60px;
    min-height: 60vh;
}
.page-header {
    margin-bottom: 28px;
}
.page-header h1 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 6px;
}
.page-header h1 i {
    margin-right: 8px;
    opacity: 0.7;
}
.page-header p {
    font-size: 15px;
    opacity: 0.6;
}

/* ===== FORM PAGE (Login/Register) ===== */
.form-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 40px 24px;
}
.form-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.06);
}
.form-card h2 {
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 4px;
}
.form-card .subtitle {
    text-align: center;
    color: #999;
    font-size: 14px;
    margin-bottom: 24px;
}
.form-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #999;
}
.form-link a {
    color: #E91E63;
    font-weight: 700;
}
.form-link a:hover { text-decoration: underline; }

/* ===== FORM ELEMENTS ===== */
.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #1e293b;
}
.form-control {
    width: 100%;
    padding: 13px 16px;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    color: #1e293b;
    transition: all 0.2s;
    outline: none;
}
.form-control:focus {
    border-color: #E91E63;
    box-shadow: 0 0 0 3px rgba(233,30,99,0.1);
    background: #fff;
}
.form-control::placeholder { color: #94a3b8; }
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='%2394a3b8' d='M8 11L3 6h10z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}
textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1.4;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
    background: linear-gradient(135deg, #E91E63, #FF5252);
    color: #fff;
    box-shadow: 0 4px 15px rgba(233,30,99,0.25);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(233,30,99,0.35); }
.btn-outline {
    background: transparent;
    border: 2px solid #e5e7eb;
    color: #1e293b;
}
.btn-outline:hover { border-color: #E91E63; color: #E91E63; }
.btn-success { background: #10b981; color: #fff; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-warning { background: #f59e0b; color: #000; }
.btn-sm { padding: 8px 16px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }

/* ===== ALERTS ===== */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert i { font-size: 16px; }
.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-danger { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
}
.badge-success { background: rgba(16,185,129,0.1); color: #10b981; }
.badge-danger { background: rgba(239,68,68,0.1); color: #ef4444; }
.badge-warning { background: rgba(245,158,11,0.1); color: #f59e0b; }
.badge-info { background: rgba(59,130,246,0.1); color: #3b82f6; }
.badge-primary { background: rgba(233,30,99,0.1); color: #E91E63; }
.badge-secondary { background: rgba(100,116,139,0.1); color: #64748b; }

/* ===== STAT CARDS ===== */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.06); }
.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    flex-shrink: 0;
}
.stat-card-info h3 { font-size: 22px; font-weight: 800; line-height: 1; }
.stat-card-info p { font-size: 13px; color: #999; margin-top: 4px; }

/* ===== TABLE CARD ===== */
.table-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
}
.table-card-header {
    padding: 18px 22px;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 700;
    font-size: 15px;
}
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
table th, table td {
    padding: 12px 18px;
    text-align: left;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
}
table th {
    background: #f8fafc;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}
table tr:hover { background: rgba(0,0,0,0.01); }

/* ===== STOCK GRID ===== */
.stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.stock-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.2s;
}
.stock-card:hover {
    border-color: #E91E63;
    box-shadow: 0 6px 20px rgba(233,30,99,0.08);
    transform: translateY(-2px);
}
.stock-card-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}
.stock-card-desc {
    font-size: 13px;
    color: #999;
    margin-bottom: 14px;
    line-height: 1.5;
}
.stock-card-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.stock-count {
    font-size: 13px;
    color: #64748b;
}
.stock-count b { color: #10b981; }
.stock-price {
    font-size: 18px;
    font-weight: 800;
    color: #E91E63;
}

/* ===== SERVICE CARD ICON ===== */
.service-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

/* ===== ANNOUNCEMENT BAR ===== */
.announcement-bar {
    padding: 12px 18px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.announcement-bar.info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.announcement-bar.warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.announcement-bar.success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.announcement-bar.danger { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}
.empty-state i {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
    opacity: 0.4;
}
.empty-state h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; color: #64748b; }
.empty-state p { font-size: 13px; }

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #e5e7eb;
    color: #64748b;
    transition: all 0.2s;
}
.pagination a:hover, .pagination a.active-page {
    background: #E91E63;
    color: #fff;
    border-color: #E91E63;
}

/* ===== ANIMATION ===== */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== SPINNER ===== */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: currentColor;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== TOOLTIP ===== */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    pointer-events: none;
}
[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* ===== GRID UTILITIES ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ===== TEXT UTILITIES ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: #999; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* ===== SPACING UTILITIES ===== */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }

/* ===== FLEX UTILITIES ===== */
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .hide-mobile { display: none !important; }
    .stat-cards { grid-template-columns: 1fr 1fr; }
    .stock-grid { grid-template-columns: 1fr; }
    .dashboard-section { padding: 20px 0 40px; }
    .form-card { padding: 28px 16px; max-width: 100%; }
    .form-page { padding: 20px 16px; }
    table th, table td { padding: 10px 12px; font-size: 13px; }
    .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* Force ALL inline grid columns to single col */
    div[style*="grid-template-columns:1fr 1fr"],
    div[style*="grid-template-columns: 1fr 1fr"],
    div[style*="grid-template-columns:2fr 1fr"],
    div[style*="grid-template-columns: 2fr 1fr"],
    div[style*="grid-template-columns:1fr 300px"],
    div[style*="grid-template-columns: 1fr 300px"] {
        grid-template-columns: 1fr !important;
    }

    /* NUCLEAR: Force ALL inline max-width to 100% on mobile */
    div[style*="max-width:"],
    div[style*="max-width :"],
    section[style*="max-width:"],
    main[style*="max-width:"] {
        max-width: 100% !important;
    }

    /* Auth cards — all themes — full width */
    .pg-auth-card, .pg-auth-glass,
    .ml-auth-form-box, .ml-entry-card,
    .tn-auth-card,
    .vm-terminal, .vm-auth-terminal {
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Overflow prevention */
    html, body { overflow-x: hidden !important; }
}
@media (max-width: 480px) {
    .stat-cards { grid-template-columns: 1fr; gap: 10px; }
    .container { padding: 0 12px; }
    .page-header h1 { font-size: 22px; }
    .form-card { padding: 20px 12px; }
}
@media (min-width: 769px) {
    .hide-desktop { display: none !important; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
