/**
 * iOS 6 Skeuomorphic Style SMS Panel
 * ok.ovizu.com - Örnek tasarıma uygun
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #c5ccd4;
    min-height: 100vh;
    font-size: 14px;
    color: #333;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 20px;
}

/* Header - Koyu Gri iOS 6 */
.header {
    background: linear-gradient(180deg, #b0bccd 0%, #6b7a8a 3%, #4a5662 50%, #3d4753 51%, #2c353f 100%);
    padding: 12px 15px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #1a1f24;
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.header h1 {
    color: #fff;
    font-size: 17px;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 -1px 0 rgba(0,0,0,0.5);
    flex: 1;
}

/* Header Buttons */
.menu-btn, .btn-refresh {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 6px;
    background: linear-gradient(180deg, #8a9bab 0%, #5a6a7a 50%, #4a5a6a 51%, #3a4a5a 100%);
    border: 1px solid #2a3a4a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.menu-btn i, .btn-refresh i {
    color: #fff;
    font-size: 16px;
    text-shadow: 0 -1px 0 rgba(0,0,0,0.4);
}

/* Mod Seçici */
.mode-selector {
    display: flex;
    gap: 10px;
    padding: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.mode-btn {
    flex: 1;
    padding: 12px 15px;
    font-size: 13px;
    font-weight: bold;
    border-radius: 8px;
    border: 1px solid #a0a0a0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    background: #fff;
    color: #666;
}

.mode-btn i {
    font-size: 16px;
}

.mode-btn.active {
    background: linear-gradient(180deg, #34D058 0%, #25D366 50%, #128C7E 100%);
    border-color: #075E54;
    color: #fff;
    text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
}

.mode-btn[data-mode="evolution"].active {
    background: linear-gradient(180deg, #8a9bab 0%, #5a6a7a 50%, #4a5a6a 51%, #3a4a5a 100%);
    border-color: #2a3a4a;
}

.mode-btn[data-mode="wabusiness"].active {
    background: linear-gradient(180deg, #0088cc 0%, #0077b5 50%, #006699 100%);
    border-color: #004d80;
}

.mode-btn:active {
    transform: scale(0.98);
}

/* Container */
.container {
    padding: 10px;
    max-width: 600px;
    margin: 0 auto;
}

/* Stats Grid - 2x2 */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.stat-box {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #a0a0a0;
    padding: 20px 15px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
}

.stat-number.warning { color: #34c759; }
.stat-number.success { color: #ff9500; }
.stat-number.secondary { color: #8e8e93; }
.stat-number.danger { color: #ff3b30; }

.stat-label {
    font-size: 11px;
    color: #8e8e93;
    text-transform: uppercase;
    margin-top: 5px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* List Card */
.card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #a0a0a0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    overflow: hidden;
    margin-bottom: 15px;
}

/* List Header - Zaman Grubu */
.list-header {
    background: linear-gradient(180deg, #e8eaed 0%, #d8dadd 100%);
    padding: 8px 15px;
    font-size: 13px;
    font-weight: bold;
    color: #4a5568;
    border-bottom: 1px solid #b0b0b0;
}

/* List Items */
.list-container {
    background: #fff;
}

.list-item {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
    background: #fff;
}

.list-item:last-child {
    border-bottom: none;
}

/* Item Avatar - Gönder Butonu */
.item-avatar {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    cursor: pointer;
    background: linear-gradient(180deg, #8a9bab 0%, #5a6a7a 50%, #4a5a6a 51%, #3a4a5a 100%);
    border: 1px solid #2a3a4a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.item-avatar i {
    color: #fff;
    font-size: 18px;
    text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
}

.item-avatar:active {
    background: linear-gradient(180deg, #5a6a7a 0%, #3a4a5a 50%, #2a3a4a 100%);
}

.item-avatar.no-match {
    background: linear-gradient(180deg, #ff6b6b 0%, #ff3b30 50%, #e02d22 100%);
    border-color: #b01a10;
}

/* Item Content */
.item-content {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin-bottom: 4px;
    line-height: 1.3;
}

.item-subtitle {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.item-time {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: linear-gradient(180deg, #3d4753 0%, #2c353f 100%);
    z-index: 201;
    transition: left 0.3s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,0.5);
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    background: linear-gradient(180deg, #4a5662 0%, #3d4753 100%);
    padding: 30px 20px 20px;
    border-bottom: 1px solid #1a1f24;
}

.sidebar-header h3 {
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 0 -1px 0 rgba(0,0,0,0.4);
}

.sidebar-header p {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    margin-top: 4px;
}

/* Balance Box */
.balance-box {
    background: linear-gradient(180deg, #3a4550 0%, #2a3540 100%);
    margin: 15px;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #1a2530;
}

.balance-box h4 {
    color: rgba(255,255,255,0.6);
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.balance-amount {
    color: #34c759;
    font-size: 24px;
    font-weight: bold;
}

.balance-sms {
    color: #ff9500;
    font-size: 16px;
    font-weight: bold;
    margin-top: 5px;
}

/* Sidebar Menu */
.sidebar-menu {
    padding: 10px 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.2s;
}

.sidebar-menu a:active {
    background: rgba(255,255,255,0.1);
}

.sidebar-menu a.active {
    background: linear-gradient(180deg, #5a6a7a 0%, #4a5a6a 100%);
}

.sidebar-menu a i {
    width: 24px;
    margin-right: 12px;
    font-size: 16px;
    text-align: center;
}

.sidebar-menu a.logout {
    color: #ff6b6b;
    margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(180deg, #4a5662 0%, #2c353f 100%);
}

.login-card {
    width: 100%;
    max-width: 320px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.4);
    overflow: hidden;
}

.login-card .card-body {
    padding: 30px 25px;
}

.login-logo {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo i {
    font-size: 50px;
    color: #4a5662;
}

.login-logo h2 {
    font-size: 20px;
    color: #333;
    margin-top: 10px;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: bold;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.form-input {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #f8f8f8;
}

.form-input:focus {
    outline: none;
    border-color: #4a5662;
    background: #fff;
}

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: bold;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    color: #fff;
    text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
}

.btn-info {
    background: linear-gradient(180deg, #8a9bab 0%, #5a6a7a 50%, #4a5a6a 51%, #3a4a5a 100%);
    border: 1px solid #2a3a4a;
}

.btn-block {
    width: 100%;
}

.btn i {
    margin-right: 8px;
}

/* Alert */
.alert {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 13px;
}

.alert-danger {
    background: #ffebee;
    border: 1px solid #ffcdd2;
    color: #c62828;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #999;
}

.empty-state i {
    font-size: 50px;
    margin-bottom: 15px;
    color: #ccc;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
.footer {
    text-align: center;
    padding: 15px;
    color: #999;
    font-size: 11px;
}

/* WhatsApp Link Button - Yeşil */
.item-avatar.wa-link {
    background: linear-gradient(180deg, #34D058 0%, #25D366 50%, #128C7E 100%);
    border-color: #075E54;
    text-decoration: none;
}

.item-avatar.wa-link:active {
    background: linear-gradient(180deg, #128C7E 0%, #075E54 100%);
}

.item-avatar.wa-link i {
    font-size: 22px;
}

/* Video Button - Turuncu (video varsa) */
.item-avatar.wa-link.has-video {
    background: linear-gradient(180deg, #FF9500 0%, #FF7F00 50%, #E56700 100%);
    border-color: #B35000;
}

.item-avatar.wa-link.has-video:active {
    background: linear-gradient(180deg, #E56700 0%, #B35000 100%);
}

.item-avatar.wa-link.has-video i {
    font-size: 18px;
}

/* Gönderildi İşaretle Butonu */
.item-action {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    flex-shrink: 0;
    cursor: pointer;
    background: linear-gradient(180deg, #48bb78 0%, #38a169 50%, #2f855a 100%);
    border: 1px solid #276749;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    align-self: center;
}

.item-action i {
    color: #fff;
    font-size: 14px;
    text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
}

.item-action:active {
    background: linear-gradient(180deg, #38a169 0%, #276749 100%);
}

/* List item düzenleme */
.list-item {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
    background: #fff;
}
