/* ================================================================
   MioPlus MICE - Custom CSS
   Modern, temiz ve profesyonel tasarım
   ================================================================ */

/* ============ CSS DEĞİŞKENLERİ ============ */
/* :root içindeki değişkenler tüm CSS'te var(--değişken) ile kullanılabilir */
:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #e8f0fe;
    --secondary: #5f6368;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --info: #0ea5e9;
    --dark: #1e293b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --text: #334155;
    --text-light: #94a3b8;
    --sidebar-width: 270px;
    --sidebar-collapsed: 72px;
    --topbar-height: 64px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 25px rgba(0,0,0,0.12);
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ GENEL RESET ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--light);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============ SIDEBAR (SOL MENÜ) ============ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    min-height: 64px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    overflow: hidden;
    transition: var(--transition);
}

.sidebar-logo img {
    height: 32px;
    width: auto;
    transition: var(--transition);
}

.sidebar.collapsed .sidebar-logo img {
    height: 28px;
}

.sidebar-toggle {
    background: rgba(255,255,255,0.08);
    border: none;
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* ============ SIDEBAR NAVİGASYON ============ */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 0;
}

/* Scrollbar stili */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
}

.nav-section-title {
    padding: 16px 20px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .nav-section-title {
    text-align: center;
    padding: 16px 8px 8px;
    font-size: 0;
}

.sidebar.collapsed .nav-section-title::after {
    content: '•••';
    font-size: 0.6rem;
    display: block;
}

.nav-item .nav-link {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
    gap: 12px;
}

.nav-item .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.nav-item .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
}

.nav-item .nav-link.active {
    color: #fff;
    background: linear-gradient(90deg, var(--primary), #2563eb);
    box-shadow: 0 2px 8px rgba(26,115,232,0.3);
    border-radius: 8px;
    margin: 2px 10px;
    padding: 10px;
}

.nav-item .nav-link.active i {
    color: #fff;
}

.sidebar.collapsed .nav-item .nav-link {
    justify-content: center;
    padding: 12px;
}

.sidebar.collapsed .nav-text {
    display: none;
}

/* ============ SIDEBAR FOOTER ============ */
.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 12px 16px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.sidebar-user:hover {
    background: rgba(255,255,255,0.06);
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.sidebar-user-info {
    overflow: hidden;
}

.sidebar-user-name {
    color: #e2e8f0;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    color: #64748b;
    font-size: 0.75rem;
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-user-info {
    display: none;
}

/* ============ MAIN WRAPPER ============ */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

.sidebar.collapsed ~ .main-wrapper {
    margin-left: var(--sidebar-collapsed);
}

/* ============ TOP BAR ============ */
.topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-height);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 900;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text);
    cursor: pointer;
    padding: 8px;
}

.topbar-search {
    position: relative;
}

.topbar-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 0.875rem;
}

.topbar-search input {
    width: 280px;
    padding: 9px 16px 9px 40px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    background: var(--light);
    transition: var(--transition);
    color: var(--text);
}

.topbar-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
    background: #fff;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--secondary);
    transition: var(--transition);
    font-size: 1.1rem;
}

.topbar-btn:hover {
    background: var(--light);
    color: var(--primary);
}

.topbar-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* Topbar User */
.topbar-user {
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.topbar-user:hover {
    background: var(--light);
}

.topbar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}

.topbar-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
}

.topbar-user-role {
    font-size: 0.72rem;
    color: var(--text-light);
}

/* ============ MAIN CONTENT ============ */
.main-content {
    padding: 24px;
}

/* ============ PAGE HEADER ============ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.02em;
}

.page-breadcrumb {
    font-size: 0.8rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-breadcrumb .separator {
    color: #cbd5e1;
}

/* ============ CARD ============ */
.mio-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.mio-card:hover {
    box-shadow: var(--shadow-md);
}

.mio-card-header {
    padding: 18px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.mio-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.mio-card-title i {
    color: var(--primary);
    font-size: 1rem;
}

.mio-card-body {
    padding: 24px;
}

/* ============ STAT CARDS ============ */
.stat-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.stat-card-icon.blue { background: #dbeafe; color: #2563eb; }
.stat-card-icon.green { background: #dcfce7; color: #16a34a; }
.stat-card-icon.orange { background: #ffedd5; color: #ea580c; }
.stat-card-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-card-icon.red { background: #fee2e2; color: #dc2626; }

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.stat-card-label {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-top: 4px;
    font-weight: 500;
}

.stat-card-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 12px;
    padding: 3px 10px;
    border-radius: 20px;
}

.stat-card-trend.up {
    background: #dcfce7;
    color: #16a34a;
}

.stat-card-trend.down {
    background: #fee2e2;
    color: #dc2626;
}

/* ============ BUTTONS ============ */
.btn-mio-primary {
    background: linear-gradient(135deg, var(--primary), #2563eb);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-mio-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #1d4ed8);
    box-shadow: 0 4px 12px rgba(26,115,232,0.3);
    transform: translateY(-1px);
    color: #fff;
}

.btn-mio-outline {
    background: transparent;
    color: var(--secondary);
    border: 1.5px solid var(--border);
    padding: 8px 18px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.82rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-mio-outline:hover,
.btn-mio-outline.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ============ QUICK ACTIONS ============ */
.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 12px;
    border-radius: var(--radius-lg);
    background: var(--light);
    border: 1.5px solid transparent;
    transition: var(--transition);
    text-align: center;
    cursor: pointer;
    min-height: 100px;
}

.quick-action:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--primary);
}

.quick-action i {
    font-size: 1.5rem;
    color: var(--primary);
}

.quick-action span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}

.quick-action:hover span {
    color: var(--primary);
}

/* ============ STATUS BADGES ============ */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.approved { background: #dcfce7; color: #16a34a; }
.status-badge.pending { background: #fef9c3; color: #ca8a04; }
.status-badge.rejected { background: #fee2e2; color: #dc2626; }
.status-badge.processing { background: #dbeafe; color: #2563eb; }

/* ============ ACTIVITY ITEMS ============ */
.activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--dark);
}

.activity-desc {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-light);
    white-space: nowrap;
}

/* ============ TABLE STİLLERİ ============ */
.table thead th {
    background: #f8fafc;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--secondary);
    padding: 14px 16px;
    white-space: nowrap;
}

.table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
}

.table tbody tr:hover {
    background: #f8fafc;
}

/* DataTables Override */
.dataTables_wrapper .dataTables_filter input {
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 6px 12px;
    font-family: 'Inter', sans-serif;
}

.dataTables_wrapper .dataTables_length select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    font-family: 'Inter', sans-serif;
}

/* ============ FORM STİLLERİ ============ */
.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    color: var(--text);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
}

.form-label {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--dark);
    margin-bottom: 6px;
}

/* ============ LOGIN PAGE ============ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1a73e8 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(26,115,232,0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(124,58,237,0.1) 0%, transparent 50%);
    animation: bgFloat 15s ease-in-out infinite alternate;
}

@keyframes bgFloat {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-20px, -20px) rotate(3deg); }
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

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

.login-logo img {
    height: 44px;
    margin-bottom: 12px;
}

.login-logo h4 {
    font-size: 1.1rem;
    color: var(--dark);
    font-weight: 700;
}

.login-logo p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 4px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .input-icon-wrapper {
    position: relative;
}

.login-form .input-icon-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 0.9rem;
    z-index: 2;
}

.login-form .input-icon-wrapper .form-control {
    padding-left: 46px;
    height: 50px;
    border-radius: 12px;
    font-size: 0.9rem;
}

.login-btn {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), #2563eb);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), #1d4ed8);
    box-shadow: 0 8px 25px rgba(26,115,232,0.4);
    transform: translateY(-2px);
}

.login-btn:active {
    transform: translateY(0);
}

.login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-error i {
    font-size: 1rem;
}

/* Floating shapes for login page */
.login-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    z-index: 0;
}

.login-shape-1 {
    width: 300px;
    height: 300px;
    background: #fff;
    top: -100px;
    right: -50px;
    animation: float1 20s ease-in-out infinite;
}

.login-shape-2 {
    width: 200px;
    height: 200px;
    background: #7c3aed;
    bottom: -50px;
    left: -50px;
    animation: float2 25s ease-in-out infinite;
}

.login-shape-3 {
    width: 150px;
    height: 150px;
    background: #f59e0b;
    top: 50%;
    right: 20%;
    animation: float3 18s ease-in-out infinite;
}

@keyframes float1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-30px, 20px); } }
@keyframes float2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(20px, -30px); } }
@keyframes float3 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-20px, -20px); } }

/* ============ CHART CONTAINER ============ */
.chart-container {
    position: relative;
    width: 100%;
}

/* ============ ANİMASYONLAR ============ */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============ SIDEBAR OVERLAY (MOBİL) ============ */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
}

/* ============ RESPONSİVE (MOBİL UYUM) ============ */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .sidebar.mobile-open + .sidebar-overlay {
        display: block;
    }
    .main-wrapper {
        margin-left: 0 !important;
    }
    .topbar-mobile-toggle {
        display: flex !important;
    }
    .topbar-search {
        display: none;
    }
    .main-content {
        padding: 16px;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    .login-card {
        padding: 32px 24px;
        margin: 10px;
    }
    .stat-card {
        padding: 18px;
    }
    .stat-card-value {
        font-size: 1.4rem;
    }
}
