@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');
@import 'components/topbar.css';
@import 'components/sidebar.css';
@import 'layouts/dashboard.css';
@import 'layouts/monitoring.css';
@import 'auth/login.css';

/* Reset style awal */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #f0f2f5;
    min-height: 100vh;
}

/* Utility classes */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Style khusus untuk halaman login */
body.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: url('images/maintenance.png') no-repeat;
    background-size: cover;
    background-position: center;
}

body.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* Style khusus untuk halaman dashboard */
body.dashboard-page {
    background: #f0f2f5;
    min-height: 100vh;
}

/* Style untuk halaman autentikasi (login, register, forgot password, dll) */
body.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: url('../images/maintenance.png') no-repeat;
    background-size: cover;
    background-position: center;
}

body.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.wrapper {
    width: 420px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(25px);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    color: white;
    border-radius: 10px;
    padding: 30px 40px;
    position: relative;
    z-index: 2;
}

.wrapper h1 {
    font-size: 36px;
    text-align: center;
    margin-bottom: 5px;
    color: white;
}

.wrapper .input-box {
    position: relative;
    width: 100%;
    height: 50px;
    margin: 15px 0;
}

.input-box input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    outline: none;
    border-radius: 40px;
    font-size: 16px;
    color: white;
    padding: 20px 45px 20px 20px;
}

.input-box input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.input-box i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
}

.wrapper .remember-forgot {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin: 8px 0;
    align-items: center;
    color: white;
}

.remember-forgot label {
    color: white;
    display: flex;
    align-items: center;
}

.remember-forgot label input {
    accent-color: #007bff;
    margin-right: 4px;
}

.remember-forgot a {
    color: white;
    text-decoration: none;
    transition: 0.3s;
}

.remember-forgot a:hover {
    color: #007bff;
}

.wrapper button {
    width: 100%;
    height: 45px;
    background: #007bff;
    border: none;
    outline: none;
    border-radius: 40px;
    box-shadow: 0 0 10px rgba(0, 0, 0, .2);
    cursor: pointer;
    font-size: 16px;
    color: white;
    font-weight: 600;
    transition: 0.3s ease;
    margin: 10px 0;
}

.wrapper button:hover {
    background: #0056b3;
    transform: scale(1.02);
}

.wrapper .register-link {
    text-align: center;
    font-size: 14px;
    margin: 10px 0 0;
    color: white;
}

.register-link p a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.register-link p a:hover {
    text-decoration: underline;
    color: #0056b3;
}

.error {
    background: rgba(255, 0, 0, 0.1);
    color: #ff0000;
    padding: 8px;
    border-radius: 8px;
    margin: 10px 0;
    text-align: center;
    font-size: 14px;
    border: 1px solid rgba(255, 0, 0, 0.2);
}

/* Update style untuk terms & conditions */
.terms-conditions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 8px 0;
    font-size: 14px;
}

.terms-conditions label {
    color: white;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-left: 5px;
}

.terms-conditions input[type="checkbox"] {
    margin-right: 4px;
    accent-color: #007bff;
    width: 14px;
    height: 14px;
}

/* Update style untuk login link */
.login-link {
    text-align: center;
    font-size: 14px;
    margin: 10px 0;
}

.login-link a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.login-link a:hover {
    text-decoration: underline;
}

/* Update style untuk register link di halaman login */
.register-link {
    text-align: center;
    font-size: 14px;
    margin: 10px 0 0;
    color: white;
}

.register-link p a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
}

.register-link p a:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* Tambahkan spacing yang lebih baik untuk form */
.wrapper form {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* Style untuk input email */
.input-box input[type="email"] {
    width: 100%;
    height: 100%;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    outline: none;
    border-radius: 40px;
    font-size: 16px;
    color: white;
    padding: 20px 45px 20px 20px;
}

.input-box input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.resend-link {
    text-align: center;
    font-size: 14px;
    margin: 10px 0 0;
    color: white;
}

.resend-link a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.resend-link a:hover {
    text-decoration: underline;
}

/* Style untuk deskripsi */
.description {
    color: white;
    text-align: center;
    margin: 0 0 15px;
    font-size: 14px;
    line-height: 1.4;
}

/* Style untuk pesan sukses */
.success {
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    padding: 8px;
    border-radius: 8px;
    margin: 10px 0;
    text-align: center;
    font-size: 14px;
    border: 1px solid rgba(0, 255, 0, 0.2);
}

/* Style untuk tombol login now */
.login-now {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 40px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
    width: 100%;
    max-width: 200px;
}

.login-now:hover {
    background: #0056b3;
    transform: scale(1.02);
}

/* Style untuk container sukses */
.success-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

/* Style untuk pesan sukses yang baru */
.success-message {
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    border: 1px solid rgba(0, 255, 0, 0.2);
    width: 100%;
}

/* Main layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background: #f0f2f5;
}

.main-content {
    flex: 1;
    padding: 20px 30px;
    margin-left: 250px;
}

/* Welcome Section */
.welcome-section {
    background: linear-gradient(135deg, #4355FF 0%, #3544cc 100%);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    margin: 30px 30px 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    transform: rotate(45deg);
    transition: all 0.5s ease;
}

.welcome-section:hover::before {
    transform: rotate(90deg);
}

.welcome-section h2 {
    font-size: 32px;
    margin: 0 0 15px;
    font-weight: 600;
}

.welcome-section p {
    font-size: 16px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding: 0 30px;
    margin-bottom: 30px;
}

.feature-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(67, 85, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: all 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 30px rgba(67, 85, 255, 0.1);
}

.feature-card:hover::after {
    opacity: 1;
}

.feature-card i {
    font-size: 32px;
    color: #4355FF;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.feature-card:hover i {
    transform: scale(1.2);
}

.feature-card h3 {
    color: #333;
    font-size: 20px;
    margin: 0 0 15px;
    font-weight: 600;
}

.feature-card p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* Quick Access Section */
.quick-access {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin: 0 30px;
}

.quick-access h3 {
    color: #333;
    font-size: 20px;
    margin: 0 0 20px;
    font-weight: 600;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.quick-link {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.quick-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #4355FF 0%, #3544cc 100%);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 1;
}

.quick-link:hover {
    transform: translateX(10px);
}

.quick-link:hover::after {
    opacity: 1;
}

.quick-link i,
.quick-link span {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.quick-link:hover i,
.quick-link:hover span {
    color: white;
}

.quick-link i {
    font-size: 24px;
    color: #4355FF;
}

/* Responsive Design */
@media screen and (max-width: 1400px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 1200px) {
.quick-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .features-grid,
    .quick-links {
        grid-template-columns: 1fr;
    }
    
    .main-content {
    padding: 15px;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card {
    animation: fadeInUp 0.5s ease forwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }

/* Styling untuk sidebar */
.sidebar {
    width: 250px;
    background: #4355FF;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    color: white;
    padding: 20px 0;
}

.sidebar .logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .logo h2 {
    color: white;
    margin: 0;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar .logo h2 i {
    font-size: 28px;
}

/* Menu section styling */
.sidebar nav {
    padding: 20px 0;
}

.sidebar nav .section-title {
    padding: 10px 20px;
    font-size: 12px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1px;
}

.sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar nav ul li a {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.sidebar nav ul li a i {
    font-size: 20px;
    margin-right: 10px;
    width: 24px;
    text-align: center;
}

.sidebar nav ul li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding-left: 25px;
}

.sidebar nav ul li.active a {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Main content styling */
.main-content {
    margin-left: 250px;
    padding: 20px;
    background: #f5f6fa;
    min-height: 100vh;
}

/* Header styling */
.page-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 20px 30px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: fixed;
    top: 0;
    right: 0;
    left: 250px;
    z-index: 100;
}

.page-title {
    font-size: 24px;
    color: #333;
    margin: 0;
}

.page-title i {
    font-size: 28px;
    color: #4355FF;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.user-profile:hover {
    background: #e9ecef;
}

.user-profile img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid #4355FF;
}

.user-profile span {
    color: #333;
    font-weight: 500;
}

/* Monitoring cards */
.monitoring-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-info h3 {
    margin: 0;
    font-size: 14px;
    color: #4355FF;
    margin-bottom: 5px;
}

.stat-info .value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.stat-icon {
    color: #4355FF;
    font-size: 24px;
}

/* Charts container */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.chart-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
}

.chart-card h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

/* Generate Report button */
.generate-report {
    background: #4355FF;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

/* Responsive design */
@media screen and (max-width: 1200px) {
    .monitoring-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .monitoring-stats {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

/* Monitoring Page Styles */
.monitoring-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.monitoring-header h1 {
    font-size: 28px;
    color: #333;
    margin: 0;
}

.generate-report {
    background: #4355FF;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.generate-report:hover {
    background: #3544cc;
}

/* Parameter Cards */
.parameter-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.param-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.param-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 12px 0 0 12px;
}

.param-card.voltage::before { background: #4355FF; }
.param-card.current::before { background: #00C853; }
.param-card.power::before { background: #FF9800; }
.param-card.resistance::before { background: #E91E63; }
.param-card.soc::before { background: #F44336; }

.param-header {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.param-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.param-value span {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.param-value i {
    font-size: 24px;
    opacity: 0.5;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.chart-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    height: 300px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.chart-header h3 {
    font-size: 16px;
    color: #333;
    margin: 0;
}

.chart-header i {
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.chart-header i:hover {
    background: #f5f5f5;
}

/* Responsive Design */
@media screen and (max-width: 1400px) {
    .parameter-cards {
        grid-template-columns: repeat(3, 1fr);
    }
    .charts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 992px) {
    .parameter-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

/* Hover Effects */
.param-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.param-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.param-card:hover .param-value i {
    opacity: 1;
}

/* Top Bar Styling */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: fixed;
    top: 0;
    right: 0;
    left: 250px;
    z-index: 1000;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    color: #333;
    font-weight: 500;
}

.page-title i {
    font-size: 24px;
    color: #4355FF;
}

/* User Dropdown Styles */
.user-dropdown {
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-info:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.username {
    font-weight: 500;
    color: #333;
}

.bx-chevron-down {
    font-size: 20px;
    color: #666;
    transition: transform 0.3s ease;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    width: 200px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-divider {
    height: 1px;
    background-color: #eee;
    margin: 4px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    border-radius: 8px;
}

.dropdown-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.dropdown-item:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.dropdown-item i {
    font-size: 18px;
    color: #4355FF;
}

.dropdown-item span {
    font-size: 14px;
}

/* Rotate chevron when dropdown is active */
.user-info.active .bx-chevron-down {
    transform: rotate(180deg);
}
