* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
    width: 100%;
    height: 100%;
}

/* Reset all links */
a {
    text-decoration: none !important;
    color: inherit !important;
}

a:hover, a:focus, a:active, a:visited {
    text-decoration: none !important;
    color: inherit !important;
}

/* Layout Wrapper */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%) !important;
    box-shadow: 2px 0 10px rgba(0,0,0,0.08) !important;
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    height: 100vh !important;
    overflow-y: auto !important;
    z-index: 1000 !important;
    border-right: 1px solid #e0e0e0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 2px solid #248a3f;
    background: linear-gradient(135deg, #248a3f 0%, #1a6b2e 100%);
}

.sidebar-header h2 {
    color: white;
    margin: 0;
    font-size: 20px;
    text-align: center;
}

.sidebar-nav {
    display: flex !important;
    flex-direction: column !important;
    padding: 10px 0 !important;
    flex-wrap: nowrap !important;
}

.sidebar-nav a {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    color: #333 !important;
    text-decoration: none !important;
    padding: 14px 20px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-left: 3px solid transparent !important;
    border-radius: 0 8px 8px 0 !important;
    margin: 2px 10px !important;
    position: relative !important;
    border: none !important;
    background: transparent !important;
    width: auto !important;
    height: auto !important;
    line-height: normal !important;
}

.sidebar-nav a:link,
.sidebar-nav a:visited,
.sidebar-nav a:hover,
.sidebar-nav a:active,
.sidebar-nav a:focus {
    text-decoration: none !important;
    color: inherit !important;
    border: none !important;
    outline: none !important;
}

.sidebar-nav a .nav-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
    transition: transform 0.3s;
}

.sidebar-nav a .nav-text {
    flex: 1;
}

.sidebar-nav a:hover {
    background: linear-gradient(90deg, #f0f7f3 0%, #e8f5ee 100%) !important;
    border-left-color: #248a3f !important;
    transform: translateX(3px) !important;
    box-shadow: 0 2px 8px rgba(36, 138, 63, 0.1) !important;
    text-decoration: none !important;
    color: #333 !important;
}

.sidebar-nav a:hover .nav-icon {
    transform: scale(1.1);
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, #248a3f 0%, #1f6f33 100%) !important;
    color: white !important;
    border-left-color: #1a6b2e !important;
    box-shadow: 0 4px 12px rgba(36, 138, 63, 0.25) !important;
    text-decoration: none !important;
}

.sidebar-nav a.active:link,
.sidebar-nav a.active:visited,
.sidebar-nav a.active:hover,
.sidebar-nav a.active:active {
    color: white !important;
    text-decoration: none !important;
}

.sidebar-nav a.active:hover {
    background: linear-gradient(135deg, #2aa04f 0%, #248a3f 100%);
    transform: translateX(3px);
}

.sidebar-nav a.logout-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    color: white !important;
    border-left-color: #c82333 !important;
    margin-top: auto !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.25) !important;
    text-decoration: none !important;
}

.sidebar-nav a.logout-btn:link,
.sidebar-nav a.logout-btn:visited,
.sidebar-nav a.logout-btn:hover,
.sidebar-nav a.logout-btn:active {
    color: white !important;
    text-decoration: none !important;
}

.sidebar-nav a.logout-btn:hover {
    background: linear-gradient(135deg, #e84555 0%, #dc3545 100%);
    transform: translateX(3px);
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.35);
}

/* Main Content */
.main-content {
    flex: 1 !important;
    margin-left: 260px !important;
    padding: 30px !important;
    background: linear-gradient(135deg, #f5f5f5 0%, #fafafa 100%) !important;
    min-height: 100vh !important;
    width: calc(100% - 260px) !important;
}

/* Hide old horizontal header - Now using sidebar */
.header,
.header-nav,
.header h2,
header.header,
nav.header-nav,
.header > h2 {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 220px;
        /* Sidebar her zaman görünür */
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px 15px;
    }
    
    .sidebar-nav a .nav-text {
        font-size: 13px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .card {
        padding: 20px;
    }
    
    .card h1 {
        font-size: 24px;
    }
    
    .card h2 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .quick-actions .btn {
        width: 100%;
    }
}

/* Container */
.container {
    max-width: 1240px;
    margin: 30px auto;
    padding: 0 20px;
}

.reseller-layout .container {
    max-width: 1120px;
    margin: 30px 80px 30px 20px;
    padding: 0 10px 0 0;
}

/* Cards */
.card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    transition: box-shadow 0.3s, transform 0.3s;
    border: 1px solid #f0f0f0;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.card h1,
.card h2 {
    margin-bottom: 20px;
    color: #248a3f;
    font-weight: 600;
    border-bottom: 2px solid #e8e8e8;
    padding-bottom: 15px;
}

.card h1 {
    font-size: 28px;
}

.card h2 {
    font-size: 24px;
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #248a3f;
}

/* Buttons - Modern & Beautiful Design */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    text-transform: none;
    letter-spacing: 0.3px;
}

.btn:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover:before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.btn i, .btn span.icon {
    font-size: 16px;
    line-height: 1;
}

/* Primary Button - Green */
.btn-primary {
    background: linear-gradient(135deg, #248a3f 0%, #1f6f33 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(36, 138, 63, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2aa04f 0%, #248a3f 100%);
    box-shadow: 0 6px 16px rgba(36, 138, 63, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active {
    box-shadow: 0 2px 8px rgba(36, 138, 63, 0.3);
}

/* Secondary Button - Gray */
.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7a848c 0%, #6c757d 100%);
    box-shadow: 0 6px 16px rgba(108, 117, 125, 0.4);
    transform: translateY(-2px);
}

.btn-secondary:active {
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

/* Danger Button - Red */
.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #e84555 0%, #dc3545 100%);
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
    transform: translateY(-2px);
}

.btn-danger:active {
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* Warning Button - Yellow */
.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #333;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ffd54f 0%, #ffc107 100%);
    box-shadow: 0 6px 16px rgba(255, 193, 7, 0.4);
    transform: translateY(-2px);
}

.btn-warning:active {
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

/* Info Button - Blue */
.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.btn-info:hover {
    background: linear-gradient(135deg, #2db9d1 0%, #17a2b8 100%);
    box-shadow: 0 6px 16px rgba(23, 162, 184, 0.4);
    transform: translateY(-2px);
}

.btn-info:active {
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}

/* Success Button - Light Green */
.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #34ce57 0%, #28a745 100%);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
    transform: translateY(-2px);
}

.btn-success:active {
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* Button Sizes */
.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
}

.btn-sm i, .btn-sm span.icon {
    font-size: 14px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
}

.btn-lg i, .btn-lg span.icon {
    font-size: 18px;
}

/* Button with Icon */
.btn-icon {
    padding: 12px 20px;
}

/* Disabled Button */
.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Outline Button Style */
.btn-outline-primary {
    background: transparent;
    color: #248a3f;
    border: 2px solid #248a3f;
    box-shadow: none;
}

.btn-outline-primary:hover {
    background: #248a3f;
    color: white;
    box-shadow: 0 4px 12px rgba(36, 138, 63, 0.3);
}

.btn-outline-danger {
    background: transparent;
    color: #dc3545;
    border: 2px solid #dc3545;
    box-shadow: none;
}

.btn-outline-danger:hover {
    background: #dc3545;
    color: white;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* Button Groups */
.btn-group {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-group .btn {
    margin: 0;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #b0b0b0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #248a3f;
    box-shadow: 0 0 0 3px rgba(36, 138, 63, 0.1), 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Tables */
.data-table {
    width: 100%;
    max-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 15px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    table-layout: auto;
    word-wrap: break-word;
}

.data-table th,
.data-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
    word-wrap: break-word;
    overflow: visible;
    text-overflow: ellipsis;
    vertical-align: middle;
    position: relative;
    z-index: 1;
}

.data-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

/* Farklı renkler her sütun başlığı için */
.data-table th:nth-child(1) { /* Checkbox */
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
}

.data-table th:nth-child(2) { /* Key */
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
}

.data-table th:nth-child(3) { /* Panel */
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    color: #6a1b9a;
}

.data-table th:nth-child(4) { /* Created By */
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
}

.data-table th:nth-child(5) { /* Duration */
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
    color: #f57f17;
}

.data-table th:nth-child(6) { /* Remaining Time */
    background: linear-gradient(135deg, #e1f5fe 0%, #b3e5fc 100%);
    color: #0277bd;
}

.data-table th:nth-child(7) { /* Created */
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
    color: #c2185b;
}

.data-table th:nth-child(8) { /* HWID */
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: #ff6f00;
}

.data-table th:nth-child(9) { /* IP Address */
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
    color: #00695c;
}

.data-table th:nth-child(10) { /* Status */
    background: linear-gradient(135deg, #ede7f6 0%, #d1c4e9 100%);
    color: #512da8;
}

.data-table th:nth-child(11) { /* Note */
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #ef6c00;
}

.data-table th:last-child { /* Actions */
    background: linear-gradient(135deg, #f1f8e9 0%, #dcedc8 100%);
    color: #558b2f;
}

/* Used Keys table specific colors (less columns) */
.used-keys-table th:nth-child(1) { /* Key */
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
}

.used-keys-table th:nth-child(2) { /* Panel */
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    color: #6a1b9a;
}

.used-keys-table th:nth-child(3) { /* Remaining Time */
    background: linear-gradient(135deg, #e1f5fe 0%, #b3e5fc 100%);
    color: #0277bd;
}

.used-keys-table th:nth-child(4) { /* HWID */
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: #ff6f00;
}

.used-keys-table th:nth-child(5) { /* IP Address */
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
    color: #00695c;
}

.used-keys-table th:nth-child(1),
.used-keys-table td:nth-child(1) {
    width: 280px;
    min-width: 240px;
    max-width: 360px;
}

.used-keys-table td:nth-child(1) code {
    white-space: normal;
    word-break: break-all;
    text-overflow: clip;
    overflow: visible;
    display: block;
    font-size: 12px;
}

.used-keys-table th:nth-child(6) { /* Used Date */
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
    color: #c2185b;
}

.used-keys-table th:nth-child(7) { /* Status */
    background: linear-gradient(135deg, #ede7f6 0%, #d1c4e9 100%);
    color: #512da8;
}

.used-keys-table th:last-child { /* Actions */
    background: linear-gradient(135deg, #f1f8e9 0%, #dcedc8 100%);
    color: #558b2f;
}

/* Announcements table specific colors */
.announcements-table th:nth-child(1) { /* ID */
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
}

.announcements-table th:nth-child(2) { /* Title */
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
}

.announcements-table th:nth-child(3) { /* Content */
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    color: #6a1b9a;
}

.announcements-table th:nth-child(4) { /* Status */
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
}

.announcements-table th:nth-child(5) { /* Created By */
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
    color: #f57f17;
}

.announcements-table th:nth-child(6) { /* Created */
    background: linear-gradient(135deg, #e1f5fe 0%, #b3e5fc 100%);
    color: #0277bd;
}

.announcements-table th:nth-child(7) { /* Updated */
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
    color: #c2185b;
}

.announcements-table th:last-child { /* Actions */
    background: linear-gradient(135deg, #f1f8e9 0%, #dcedc8 100%);
    color: #558b2f;
}

/* Announcements table - fixed layout for proper ellipsis */
.announcements-table {
    table-layout: fixed !important;
    width: 100% !important;
}

/* Force content column inner elements to never exceed width - ÇOK SIKI */
.announcements-table td:nth-child(3) *,
.announcements-table .announcement-content * {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: inline-block !important;
    box-sizing: border-box !important;
}

/* Tüm iç elemanlar için kesin kurallar */
.announcements-table td:nth-child(3) *,
.announcements-table .announcement-content *,
.announcements-table td:nth-child(3) span,
.announcements-table .announcement-content span {
    max-width: 100% !important;
    width: auto !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* ============================================
   PANELS TABLE - Secret Key Column (Same as Announcements Content)
   ============================================ */
.panels-table {
    table-layout: fixed !important;
    width: 100% !important;
}

/* Panels ID Column - Small width for single digit/numbers */
.panels-table th:nth-child(1),
.panels-table td:nth-child(1) { /* ID */
    width: 40px !important;
    max-width: 40px !important;
    min-width: 40px !important;
    text-align: center !important;
}

/* Panels Secret Key Column - Tamamen göster, ellipsis yok */
.panels-table th:nth-child(3),
.panels-table td:nth-child(3),
.panels-table .panel-secret { /* Secret Key */
    width: 400px !important;
    max-width: none !important;
    min-width: 400px !important;
    overflow: visible !important;
    white-space: nowrap !important;
    word-wrap: normal !important;
    word-break: normal !important;
    position: relative !important;
    display: table-cell !important;
    box-sizing: border-box !important;
    padding: 12px 10px !important;
}

/* Override any other rules that might interfere */
.panels-table td:nth-child(3),
.panels-table .panel-secret {
    width: 400px !important;
    max-width: none !important;
    min-width: 400px !important;
    overflow: visible !important;
    white-space: nowrap !important;
    word-wrap: normal !important;
    word-break: normal !important;
    display: table-cell !important;
}

/* Secret içindeki code için kurallar - ellipsis yok */
.panels-table td:nth-child(3) code,
.panels-table .panel-secret code {
    white-space: nowrap !important;
    display: inline !important;
}

/* Panels content - hover durumunda da ellipsis yok */
.panels-table tr:hover td:nth-child(3),
.panels-table tr:hover .panel-secret {
    word-wrap: normal !important;
    word-break: normal !important;
    white-space: nowrap !important;
    overflow: visible !important;
    width: 400px !important;
    max-width: none !important;
    min-width: 400px !important;
}

/* Panels content span/code - hover durumunda ellipsis yok */
.panels-table tr:hover td:nth-child(3) code,
.panels-table tr:hover .panel-secret code {
    white-space: nowrap !important;
    display: inline !important;
}

/* Override hover overflow for panels secret content - ellipsis yok */
.panels-table td:nth-child(3):hover,
.panels-table .panel-secret:hover {
    overflow: visible !important;
    white-space: nowrap !important;
    word-wrap: normal !important;
    word-break: normal !important;
    width: 400px !important;
    max-width: none !important;
    min-width: 400px !important;
    box-shadow: none !important;
    background: inherit !important;
}

/* Hover durumunda code için kurallar - ellipsis yok */
.panels-table td:nth-child(3):hover code,
.panels-table .panel-secret:hover code {
    white-space: nowrap !important;
    display: inline !important;
}

/* Force secret column inner elements - ellipsis yok */
.panels-table td:nth-child(3) *,
.panels-table .panel-secret * {
    white-space: nowrap !important;
    display: inline !important;
}

/* ============================================
   ADMIN USERS TABLE - ID Column (Small width)
   ============================================ */
.admin-users-table {
    table-layout: fixed !important;
    width: 100% !important;
}

/* Admin Users ID Column - Small width for single digit/numbers */
.admin-users-table th:nth-child(1),
.admin-users-table td:nth-child(1) { /* ID */
    width: 40px !important;
    max-width: 40px !important;
    min-width: 40px !important;
    text-align: center !important;
}

/* Announcements table column widths - FIXED WIDTHS for table-layout: fixed */
.announcements-table th:nth-child(1),
.announcements-table td:nth-child(1) { /* ID */
    width: 60px !important;
    max-width: 60px !important;
    min-width: 60px !important;
    text-align: center;
}

.announcements-table th:nth-child(2),
.announcements-table td:nth-child(2) { /* Title */
    width: 180px !important;
    min-width: 150px;
    font-weight: 600;
}

/* Announcements Content Column - 50 karakter sonra ellipsis - ÇOK SIKI KURALLAR */
.announcements-table th:nth-child(3),
.announcements-table td:nth-child(3),
.announcements-table .announcement-content { /* Content */
    width: 200px !important;
    max-width: 200px !important;
    min-width: 200px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    word-wrap: normal !important;
    word-break: normal !important;
    position: relative !important;
    display: table-cell !important;
    box-sizing: border-box !important;
    padding: 12px 10px !important;
}

/* Override any other rules that might interfere */
.announcements-table td:nth-child(3),
.announcements-table .announcement-content {
    width: 200px !important;
    max-width: 200px !important;
    min-width: 200px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    word-wrap: normal !important;
    word-break: normal !important;
    display: table-cell !important;
}

/* Content içindeki span için de kesin kurallar */
.announcements-table td:nth-child(3) span,
.announcements-table .announcement-content span {
    display: inline-block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.announcements-table th:nth-child(4),
.announcements-table td:nth-child(4) { /* Status */
    width: 100px !important;
    max-width: 100px !important;
}

.announcements-table th:nth-child(5),
.announcements-table td:nth-child(5) { /* Created By */
    width: 120px !important;
    min-width: 100px;
}

.announcements-table th:nth-child(6),
.announcements-table td:nth-child(6), /* Created */
.announcements-table th:nth-child(7),
.announcements-table td:nth-child(7) { /* Updated */
    width: 140px !important;
    min-width: 140px;
}

.announcements-table th:last-child,
.announcements-table td:last-child { /* Actions */
    width: 120px !important;
    max-width: 120px !important;
    text-align: center;
}

/* Announcements table specific colors */
.announcements-table th:nth-child(1) { /* ID */
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
}

.announcements-table th:nth-child(2) { /* Title */
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
}

.announcements-table th:nth-child(3) { /* Content */
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    color: #6a1b9a;
}

.announcements-table th:nth-child(4) { /* Status */
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
}

.announcements-table th:nth-child(5) { /* Created By */
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
    color: #f57f17;
}

.announcements-table th:nth-child(6) { /* Created */
    background: linear-gradient(135deg, #e1f5fe 0%, #b3e5fc 100%);
    color: #0277bd;
}

.announcements-table th:nth-child(7) { /* Updated */
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
    color: #c2185b;
}

.announcements-table th:last-child { /* Actions */
    background: linear-gradient(135deg, #f1f8e9 0%, #dcedc8 100%);
    color: #558b2f;
}

/* Dropdown Actions Menu */
.dropdown-actions {
    position: relative;
    display: inline-block;
    z-index: 100;
    isolation: auto !important;
}

/* Ensure dropdown menu is on top of table rows */
.data-table td .dropdown-actions {
    z-index: 100;
}

.data-table td .dropdown-menu {
    z-index: 9999 !important;
    background: #ffffff !important;
    opacity: 1 !important;
    position: absolute !important;
}

/* Prevent table rows from showing through dropdown */
.data-table tr {
    position: relative;
    z-index: 1;
}

.data-table td {
    position: relative;
    z-index: 1;
    overflow: visible !important;
}

.table-wrapper {
    overflow: visible !important;
    position: relative;
    z-index: 1;
}

.data-table {
    overflow: visible !important;
    position: relative;
    z-index: 1;
}

/* Ensure dropdown container doesn't create stacking context */
.dropdown-actions {
    position: relative;
    z-index: 100;
    isolation: auto !important;
}

.dropdown-toggle {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    position: relative;
}

.dropdown-menu {
    position: fixed !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1px solid #ddd !important;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    min-width: 200px;
    z-index: 999999 !important;
    padding: 8px 0;
    overflow: hidden;
    animation: fadeIn 0.2s ease-out;
    opacity: 1 !important;
    visibility: visible !important;
    display: none;
    isolation: isolate;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: opacity, transform;
    pointer-events: auto !important;
    mix-blend-mode: normal !important;
}

.dropdown-menu.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
        background-color: rgba(255, 255, 255, 0);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        background-color: rgba(255, 255, 255, 1);
    }
}

.dropdown-menu.show {
    display: block !important;
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 13px;
    white-space: nowrap;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
    outline: none;
}

.dropdown-item button {
    display: block;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-weight: 500;
}

.dropdown-item:hover {
    background: linear-gradient(90deg, #f0f7f3 0%, #e8f5ee 100%);
    color: #248a3f;
    transform: translateX(3px);
}

.dropdown-item:active {
    background: #e8e8e8;
}

.dropdown-item-danger {
    color: #dc3545 !important;
}

.dropdown-item-danger:hover {
    background: linear-gradient(90deg, #fff5f5 0%, #ffe8e8 100%) !important;
    color: #dc3545 !important;
}

.dropdown-divider {
    height: 1px;
    margin: 6px 0;
    overflow: hidden;
    background: #e8e8e8;
    border: none;
}

/* Compact Action Buttons */
.action-buttons-compact {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
}

.btn-compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-compact:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.btn-compact:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-compact-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-color: #28a745;
}

.btn-compact-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1eae89 100%);
    color: white;
}

.btn-compact-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #212529;
    border-color: #ffc107;
}

.btn-compact-warning:hover {
    background: linear-gradient(135deg, #e0a800 0%, #e68900 100%);
    color: #212529;
}

.btn-compact-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    border-color: #17a2b8;
}

.btn-compact-info:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
    color: white;
}

.btn-compact-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border-color: #dc3545;
}

.btn-compact-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    color: white;
}

.btn-compact-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border-color: #6c757d;
}

.btn-compact-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #545b62 100%);
    color: white;
}

/* Tooltip for compact buttons */
.btn-compact[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: #333;
    color: white;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 4px;
    margin-bottom: 5px;
    z-index: 1000;
    pointer-events: none;
}

.btn-compact[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #333;
    margin-bottom: 1px;
    z-index: 1000;
    pointer-events: none;
}

/* Announcements table content column width */
.announcements-table td:nth-child(2) {
    min-width: 150px;
    font-weight: 600;
}

.data-table td {
    font-size: 13px;
}

.data-table tr:hover {
    background: #f8f9fa;
    transition: background 0.2s;
}

.data-table tr:hover td {
    word-wrap: break-word;
    position: relative;
}

/* Announcements content - keep ellipsis even on hover - ÇOK SIKI */
.announcements-table tr:hover td:nth-child(3),
.announcements-table tr:hover .announcement-content {
    word-wrap: normal !important;
    word-break: normal !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 200px !important;
    max-width: 200px !important;
    min-width: 200px !important;
}

/* Announcements content span - hover durumunda da ellipsis */
.announcements-table tr:hover td:nth-child(3) span,
.announcements-table tr:hover .announcement-content span {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    width: 100% !important;
    display: inline-block !important;
}

/* Tooltip for truncated text on hover */
.data-table td:hover {
    overflow: visible;
    z-index: 100;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Override hover overflow for announcements content - ÇOK ÖNEMLİ */
.announcements-table td:nth-child(3):hover,
.announcements-table .announcement-content:hover {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    word-wrap: normal !important;
    word-break: normal !important;
    width: 200px !important;
    max-width: 200px !important;
    min-width: 200px !important;
    box-shadow: none !important;
    background: inherit !important;
}

/* Hover durumunda span için de kurallar */
.announcements-table td:nth-child(3):hover span,
.announcements-table .announcement-content:hover span {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    width: 100% !important;
    display: inline-block !important;
}

/* Override data-table hover for announcements content */
.announcements-table td:nth-child(3):hover,
.announcements-table .announcement-content:hover {
    overflow: hidden !important;
    box-shadow: none !important;
    background: inherit !important;
}

/* Announcements content - keep ellipsis on hover, show tooltip */
.announcements-table td:nth-child(3),
.announcements-table .announcement-content {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.announcements-table td:nth-child(3):hover,
.announcements-table .announcement-content:hover {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    z-index: 100;
    position: relative;
}

.announcements-table td:nth-child(3):hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 0;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    white-space: normal;
    max-width: 500px;
    word-wrap: break-word;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    margin-bottom: 5px;
    font-size: 13px;
    line-height: 1.4;
}

.announcements-table td:nth-child(3):hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 20px;
    border: 6px solid transparent;
    border-top-color: #333;
    margin-bottom: -1px;
    z-index: 1000;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table code {
    background: #f4f4f4;
    padding: 4px 8px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    word-break: normal;
    white-space: nowrap;
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Reseller Panel Layout Refresh Overrides --- */
.reseller-layout {
    display: flex !important;
    min-height: 100vh !important;
    background: #f5f7fa !important;
}
.reseller-layout .sidebar {
    width: 240px !important;
    position: sticky !important;
    top: 0;
    height: 100vh !important;
    background: #f8fbfd !important;
    border-right: 1px solid rgba(0,0,0,0.05) !important;
    box-shadow: 4px 0 18px rgba(22,45,32,0.08) !important;
    border-radius: 0 24px 24px 0;
    overflow: hidden;
}
.reseller-layout .sidebar-header {
    background: linear-gradient(135deg, #248a3f 0%, #1a6b2e 100%) !important;
    border-bottom: none !important;
    padding: 28px 20px 32px !important;
    text-align: center;
}
.reseller-layout .sidebar-header h2 {
    color: #fff !important;
    font-size: 20px !important;
}
.reseller-layout .sidebar-header span {
    color: rgba(255,255,255,0.85) !important;
}
.reseller-layout .sidebar-nav {
    padding: 20px 16px !important;
    gap: 12px !important;
}
.reseller-layout .sidebar-nav a {
    background: #ffffff !important;
    border-radius: 14px !important;
    box-shadow: 0 6px 16px rgba(20,33,20,0.05) !important;
    margin: 0 !important;
    border-left: none !important;
    padding: 12px 14px !important;
    font-weight: 600 !important;
    color: #2a3d4f !important;
    justify-content: flex-start !important;
}
.reseller-layout .sidebar-nav a .nav-icon {
    width: 36px !important;
    height: 36px !important;
    background: #f2f5f7 !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.reseller-layout .sidebar-nav a.active {
    background: linear-gradient(135deg, #248a3f 0%, #1d6c33 100%) !important;
    color: #fff !important;
    box-shadow: 0 12px 24px rgba(36,138,63,0.25) !important;
}
.reseller-layout .sidebar-nav a.active .nav-icon {
    background: rgba(255,255,255,0.25) !important;
    color: #fff !important;
}
.reseller-layout .sidebar-nav a.logout-btn {
    margin-top: 12px !important;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    color: #fff !important;
    box-shadow: 0 12px 24px rgba(220,53,69,0.25) !important;
}
.reseller-layout .sidebar-nav a.logout-btn .nav-icon {
    background: rgba(255,255,255,0.25) !important;
    color: #fff !important;
}
.reseller-layout .sidebar-nav .nav-badge {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #ff4757;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.reseller-layout .main-content {
    margin-left: 240px !important;
    padding: 32px 32px 32px 32px !important;
    width: calc(100% - 240px) !important;
    background: #f5f7fa !important;
    min-height: 100vh !important;
}
/* Table wrapper for responsive scrolling */
.table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    margin-top: 15px;
    position: relative;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Desktop: Show all columns without scrolling */
@media (min-width: 1400px) {
    .table-wrapper {
        overflow-x: visible;
    }
    
    .table-wrapper .data-table {
        width: 100%;
    }
}

.table-wrapper .data-table {
    width: 100%;
    margin-top: 0;
    table-layout: auto;
}
/* key sütün uzunlugu */
.reseller-layout .data-table th:first-child,
.reseller-layout .data-table td:first-child {
    width: 250px;
    min-width: 250px;
}
.reseller-layout .data-table th:nth-child(2),
.reseller-layout .data-table td:nth-child(2) {
    width: 140px;
}
.reseller-layout .data-table th:nth-child(3),
.reseller-layout .data-table td:nth-child(3) {
    width: 100px;
}

/* Responsive table - stack columns on mobile */
@media (max-width: 1200px) {
    .data-table {
        table-layout: auto;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
        font-size: 12px;
    }
}

@media (max-width: 1400px) {
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table {
        min-width: 1200px;
    }
}

@media (max-width: 768px) {
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table {
        min-width: 1000px;
        font-size: 11px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 6px;
        font-size: 11px;
    }
}

/* Specific column widths for better layout */
.data-table th:nth-child(1),
.data-table td:nth-child(1) { /* Checkbox */
    width: 40px;
    max-width: 40px;
    text-align: center;
    padding: 12px 5px;
}

/* Optimized column widths - percentages for better fit */
.data-table th:nth-child(2),
.data-table td:nth-child(2) { /* Key */
    width: 16%;
    min-width: 130px;
}

.data-table th:nth-child(3),
.data-table td:nth-child(3) { /* Panel */
    width: 9%;
    min-width: 80px;
}

.data-table th:nth-child(4),
.data-table td:nth-child(4) { /* Created By */
    width: 8%;
    min-width: 80px;
}

.data-table th:nth-child(5),
.data-table td:nth-child(5) { /* Duration */
    width: 8%;
    min-width: 80px;
}

.data-table th:nth-child(6),
.data-table td:nth-child(6) { /* Remaining Time */
    width: 9%;
    min-width: 90px;
}

.data-table th:nth-child(7),
.data-table td:nth-child(7) { /* Created */
    width: 9%;
    min-width: 90px;
}

.data-table th:nth-child(8),
.data-table td:nth-child(8) { /* HWID */
    width: 10%;
    min-width: 110px;
}

.data-table th:nth-child(9),
.data-table td:nth-child(9) { /* IP Address */
    width: 8%;
    min-width: 90px;
}

.data-table th:nth-child(10),
.data-table td:nth-child(10) { /* Status */
    width: 6%;
    min-width: 70px;
}

.data-table th:nth-child(11),
.data-table td:nth-child(11) { /* Note */
    width: 6%;
    min-width: 80px;
}

.data-table th:last-child,
.data-table td:last-child { /* Actions */
    width: 9%;
    min-width: 110px;
    white-space: nowrap;
    text-align: center;
}

/* Action buttons in table - compact */
.data-table td:last-child .btn {
    margin: 2px;
    padding: 6px 10px;
    font-size: 11px;
    white-space: nowrap;
    display: inline-block;
}

.data-table td:nth-child(2) code {
    white-space: normal;
    word-break: break-all;
    text-overflow: clip;
    overflow: visible;
    display: block;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-used {
    background: #cce5ff;
    color: #004085;
}

.status-banned {
    background: #f8d7da;
    color: #721c24;
}

.status-expired {
    background: #fff3cd;
    color: #856404;
}

.status-paused {
    background: #e2e3e5;
    color: #383d41;
}

/* Alerts */
/* Alerts - Modern Design */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid;
    animation: slideIn 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left-color: #28a745;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.alert-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left-color: #dc3545;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-left-color: #17a2b8;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.2);
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border-left-color: #ffc107;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
    opacity: 0.3;
}

/* Actions */
.actions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
}

/* Reseller actions - compact buttons */
.manage-resellers-table .actions {
    gap: 4px;
}

.manage-resellers-table .actions button,
.manage-resellers-table .actions a {
    padding: 4px 8px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    min-height: auto !important;
    height: auto !important;
}

/* Responsive - Mobile First Approach */
@media (max-width: 768px) {
    /* Sidebar - Hide on mobile, show as hamburger menu */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 280px !important;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    /* Mobile menu toggle button */
    .mobile-menu-toggle {
        display: block !important;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1001;
        background: #248a3f;
        color: white;
        border: none;
        padding: 12px;
        border-radius: 8px;
        font-size: 20px;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }
    
    /* Main content - full width on mobile */
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 20px 15px !important;
        padding-top: 70px !important;
    }
    
    /* Stats grid */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Form rows */
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Tables */
    .data-table {
        font-size: 12px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 6px;
        white-space: nowrap;
    }
    
    /* Cards */
    .card {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    /* Buttons */
    .btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
    
    .btn-sm {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    /* Container */
    .container {
        padding: 15px;
    }
    
    /* Headings */
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    /* Table wrapper */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Actions */
    .actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .actions button,
    .actions a {
        width: 100%;
    }
    
    /* Modal */
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        padding: 20px 15px !important;
    }
    
    /* Input fields - prevent zoom on iOS */
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 15px 10px !important;
        padding-top: 65px !important;
    }
    
    .card {
        padding: 15px 10px;
    }
    
    h1 {
        font-size: 20px;
    }
    
    h2 {
        font-size: 18px;
    }
    
    .data-table {
        font-size: 11px;
    }
    
    .data-table th,
    .data-table td {
        padding: 6px 4px;
    }
    
    .btn {
        padding: 10px;
        font-size: 13px;
    }
    
    .mobile-menu-toggle {
        top: 10px;
        left: 10px;
        padding: 10px;
        font-size: 18px;
    }
    
    .sidebar {
        width: 100% !important;
    }
}

