/* 
 * PHP URL Shortener - Custom Styles
 * Giao diện tiếng Việt
 */

/* Variables */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --sidebar-width: 250px;
    --sidebar-bg: #212529;
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* Sidebar Layout */
.wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.2);
}

.sidebar-header h3 {
    color: #fff;
    margin: 0;
    font-size: 1.2rem;
}

.sidebar-menu {
    padding: 0;
    margin: 0;
    list-style: none;
}

.sidebar-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-menu a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
}

/* Top Navbar */
.top-navbar {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-navbar .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-navbar .user-info span {
    color: var(--secondary-color);
}

/* Page Content */
.page-content {
    padding: 20px;
}

/* Stats Cards */
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
}

.stat-card .stat-icon.bg-primary {
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
}

.stat-card .stat-icon.bg-success {
    background: linear-gradient(135deg, #198754, #146c43);
}

.stat-card .stat-icon.bg-info {
    background: linear-gradient(135deg, #0dcaf0, #0aa2c0);
}

.stat-card .stat-icon.bg-warning {
    background: linear-gradient(135deg, #ffc107, #cc9a06);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #212529;
}

.stat-card .stat-label {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Tables */
.table-container {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.table-container .table {
    margin-bottom: 0;
}

.table-container .table th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

/* Forms */
.form-container {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn-copy {
    cursor: pointer;
}

.btn-copy:hover {
    opacity: 0.8;
}

/* Short Link Display */
.short-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #e9ecef;
    padding: 5px 10px;
    border-radius: 5px;
}

.short-link code {
    font-size: 0.9rem;
    color: var(--primary-color);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: #fff;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.login-box .form-control {
    padding: 12px 15px;
    border-radius: 8px;
}

.login-box .btn-primary {
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
}

/* Install Page */
.install-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    padding: 20px;
}

.install-box {
    background: #fff;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 500px;
}

.install-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
}

/* Badge */
.badge-masked {
    background-color: #6f42c1;
}

/* Pagination */
.pagination {
    margin-bottom: 0;
}

.pagination .page-link {
    border-radius: 5px;
    margin: 0 2px;
}

/* Charts Container */
.chart-container {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }

    .sidebar.active {
        margin-left: 0;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .main-content.active {
        margin-left: var(--sidebar-width);
    }

    .stat-card .stat-value {
        font-size: 1.5rem;
    }
}

/* URL Truncate */
.url-truncate {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

/* Copy tooltip */
.copy-success {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 9999;
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-20px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}

/* Quick Form */
.quick-form {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 25px;
    color: #fff;
}

.quick-form h5 {
    margin-bottom: 20px;
}

.quick-form .form-control {
    border: none;
    border-radius: 8px;
}

.quick-form .btn {
    border-radius: 8px;
}

/* 404 Page */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #fff;
    text-align: center;
}

.error-page h1 {
    font-size: 8rem;
    font-weight: bold;
    margin-bottom: 0;
}

.error-page h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}
