* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --light-bg: #ecf0f1;
    --dark-text: #1f3954;
    --border-color: #ddd;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-text);
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.login-header h2 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

/* Wrapper */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Main Content */
.main-content {
    margin-left: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Topbar (legacy) */
.topbar {
    background-color: white;
    padding: 20px 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1020; /* above content */
}

/* Buton Stilleri */
.btn {
    transition: all 0.3s ease;
}

.btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    font-weight: 500;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.btn-outline-info {
    border: 2px solid #17a2b8;
    color: #17a2b8;
    font-weight: 500;
}

.btn-outline-info:hover {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.topbar h1 {
    font-size: 24px;
    color: var(--secondary-color);
    margin: 0;
}

/* Content */
.content {
    flex-grow: 1;
    padding: 30px;
}

.container-fluid {
    width: 100%;
}

/* Footer */
.footer {
    background-color: white;
    padding: 15px 30px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

/* Cards */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: bold;
}

.card-body {
    padding: 20px;
}

.card-stats {
    padding: 12px 15px;
    text-align: center;
}

.card-stats .stats-icon {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.card-stats .stats-info h4,
.card-stats .stats-info h5 {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
    font-weight: 500;
}

.card-stats .stats-info h2,
.card-stats .stats-info h3 {
    font-size: 24px;
    color: var(--secondary-color);
    margin: 0;
    font-weight: 600;
}

/* Grid */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col,
.col-md-3,
.col-md-4,
.col-md-6,
.col-md-8,
.col-auto {
    padding: 0 10px;
    margin-bottom: 20px;
}

.col-md-3 { flex: 0 0 25%; max-width: 25%; }
.col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-8 { flex: 0 0 66.666%; max-width: 66.666%; }
.col { flex: 1; }
.col-auto { flex: 0 0 auto; }

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-info {
    background-color: var(--info-color);
    color: white;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table-striped tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.table-borderless th,
.table-borderless td {
    border: none;
}

.table-sm th,
.table-sm td {
    padding: 8px;
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary { background-color: var(--primary-color); color: white; }
.badge-success { background-color: var(--success-color); color: white; }
.badge-danger { background-color: var(--danger-color); color: white; }
.badge-warning { background-color: var(--warning-color); color: white; }
.badge-info { background-color: var(--info-color); color: white; }

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1rem; }
.w-100 { width: 100%; }

.page-header {
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 28px;
    color: var(--secondary-color);
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.d-flex {
    display: flex;
}

.input-group {
    display: flex;
}

.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-right: none;
    padding: 0.375rem 0.75rem;
    font-weight: 600;
    color: #495057;
    border-radius: 5px 0 0 5px;
}

.input-group .form-control {
    border-radius: 0 5px 5px 0;
}

.input-group .btn {
    border-radius: 0 5px 5px 0;
}

.list-group {
    list-style: none;
}

.list-group-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

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

/* Responsive Mobile First Utilities */
@media (max-width: 991px) {
    .container-fluid {
        padding-left: 0;
        padding-right: 0;
    }
    
    .card {
        margin-bottom: 10px;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .card-body {
        padding: 0.75rem 0.5rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .btn-group {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .btn-group.btn-group-sm {
        gap: 3px;
    }
    
    /* Table responsive text scaling */
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
    }
    
    .table small {
        font-size: 0.75rem;
    }
    
    /* Mobile bottom nav visibility */
    .mobile-bottom-nav {
        display: flex !important;
    }
}

@media (max-width: 576px) {
    /* Mobile padding */
    .container,
    .container-fluid {
        padding-left: 0;
        padding-right: 0;
    }
    
    .card {
        border-radius: 0;
        border: none;
        border-bottom: 1px solid #e0e0e0;
        margin-bottom: 5px;
    }
    
    .card-body {
        padding: 0.5rem;
    }
    
    /* Header adjustments */
    .page-header h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    /* Button sizing on mobile */
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Badge sizing */
    .badge {
        font-size: 0.75rem;
        padding: 0.35em 0.65em;
    }
    
    /* Form improvements */
    .form-control,
    .form-select {
        font-size: 16px;
        padding: 0.5rem 0.75rem;
    }
    
    .input-group {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .input-group-text {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .input-group .form-control {
        min-width: 0;
    }
    
    .input-group-lg .form-control,
    .input-group-lg .form-select {
        padding: 0.5rem 0.75rem;
        font-size: 1rem;
    }
    
    /* Card improvements */
    .card-header {
        padding: 1rem;
    }
    
    /* Hide verbose columns on mobile */
    .d-none.d-lg-block {
        display: none !important;
    }
    
    /* Flex adjustments */
    .gap-2 {
        gap: 0.5rem !important;
    }
    
    .gap-3 {
        gap: 0.75rem !important;
    }
    
    /* Modal improvements */
    .modal-dialog {
        margin: 10px;
    }
    
    /* Mobile Bottom Navigation */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        display: flex;
        justify-content: space-around;
        align-items: center;
        height: 70px;
        padding: 0.5rem 0;
        z-index: 9999;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-bottom-nav .nav-item {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        color: rgba(255, 255, 255, 0.8);
        text-decoration: none;
        font-size: 1.5rem;
        transition: all 0.3s ease;
        position: relative;
    }
    
    .mobile-bottom-nav .nav-item:hover,
    .mobile-bottom-nav .nav-item.active {
        color: white;
        transform: scale(1.1);
    }
    
    .mobile-bottom-nav .dropdown-toggle::after {
        display: none;
    }
    
    .mobile-bottom-nav .dropdown-menu {
        bottom: 70px;
        left: auto;
        right: 0;
        min-width: 200px;
        z-index: 10000;
    }
    
    /* Add bottom padding to body when mobile nav is present */
    body {
        padding-bottom: 70px !important;
    }
    
    .container,
    .container-fluid {
        padding-bottom: 0 !important;
    }
    
    main {
        margin-bottom: 0;
    }
}

@media (min-width: 992px) {
    body {
        padding-bottom: 0 !important;
    }
    
    .mobile-bottom-nav {
        display: none !important;
    }
}
