/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f6fa;
    color: #333;
    line-height: 1.6;
}

/* Login Page */
.login-body {
    background: linear-gradient(135deg, #4b2d00 50%, #f6f90c 0%, #4b2d00 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-title {
    color: #333;
    margin-bottom: 5px;
    font-size: 28px;
    font-weight: 700;
}

.login-subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.login-form {
    text-align: left;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: linear-gradient(135deg, #7f5902 0%, #4b2d00 100%);
    color: white;
    padding: 20px 0;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.sidebar-header h2 {
    font-size: 20px;
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 12px;
    opacity: 0.8;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover, .nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: white;
}

.nav-item.logout {
    margin-top: auto;
    color: #ff6b6b;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.header {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header h1 {
    color: #333;
    font-size: 24px;
}

.user-info {
    color: #666;
    font-size: 14px;
}

.content {
    padding: 30px;
    flex: 1;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

/* Button Styles */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #4b2d00 100%, #f6f90c 0%, #4b2d00 100%);
    border: 2px solid #ffb308;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-login {
    width: 100%;
    margin-top: 10px;
}

/* Alert Styles */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* URL Cards */
.urls-grid {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.url-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s ease;
}

.url-card:hover {
    transform: translateY(-3px);
}

.url-info h3 {
    color: #333;
    margin-bottom: 8px;
}

.target-url {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
    word-break: break-all;
}

.short-url {
    color: #667eea;
    font-size: 14px;
    margin-bottom: 5px;
}

.short-url a {
    color: #667eea;
    text-decoration: none;
}

.short-url a:hover {
    text-decoration: underline;
}

.created-at {
    color: #999;
    font-size: 12px;
}

.url-stats {
    text-align: center;
}

.stat {
    margin-bottom: 10px;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #666;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

/* Section Styles */
.section {
    margin-bottom: 40px;
}

.section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 22px;
}

.url-form {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    max-width: 600px;
}

/* Traffic Page */
.traffic-header {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
}

.traffic-header h2 {
    color: #333;
    margin-bottom: 10px;
}

.total-clicks {
    font-size: 16px;
    color: #667eea;
    font-weight: 600;
}

.traffic-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.traffic-table {
    width: 100%;
    border-collapse: collapse;
}

.traffic-table th,
.traffic-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.traffic-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.traffic-table tr:hover {
    background: #f8f9fa;
}

.user-agent {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Login Info */
.login-info {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 12px;
    text-align: left;
}

.login-info p {
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .url-card {
        flex-direction: column;
        text-align: center;
    }
    
    .url-stats {
        margin-top: 15px;
    }
    
    .traffic-table {
        font-size: 14px;
    }
    
    .traffic-table th,
    .traffic-table td {
        padding: 10px 5px;
    }
}