/* Modern Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #15c0dc 0%, #00a3bf 100%);
    min-height: 100vh;
}

.wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Modern Logo */
.logo {
    text-align: center;
    padding: 30px 0;
    margin-bottom: 20px;
}

.logo img {
    max-width: 300px;
    height: auto;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.support-button {
    display: none; /* Remove old support button */
}

/* Modern Container */
.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 30px;
    margin: 20px 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    flex: 1;
}

.container a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.container a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Modern Tables */
.container table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.container table thead td {
    background: linear-gradient(135deg, #15c0dc 0%, #00a3bf 100%);
    color: white;
    padding: 15px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.container table tbody td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.container table tbody tr:hover td {
    background-color: #f8f9fa;
}

.container .box {
    border-top: 3px solid #3498db;
    padding-top: 20px;
    margin-top: 30px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

/* Modern Form Elements */
.container input {
    background-color: #fff;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 15px;
}

.container input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.container input[type="submit"] {
    background: linear-gradient(135deg, #15c0dc 0%, #00a3bf 100%);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.container input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.container button {
    background: linear-gradient(135deg, #15c0dc 0%, #00a3bf 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.container button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* Modern Navigation - Top menu for non-logged-in users */
.navigation {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.navigation li {
    position: relative;
}

.navigation li a {
    display: block;
    text-decoration: none;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navigation li a:hover,
.navigation li a.active {
    background: linear-gradient(135deg, #15c0dc 0%, #00a3bf 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Sidebar Layout for Logged-in Users */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background: linear-gradient(180deg, #00a3bf 0%, #15c0dc 100%);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-nav {
    padding: 120px 20px 20px 20px;
}

.sidebar-nav a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    margin: 5px 0;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 500;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,0.2);
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 20px;
    min-height: calc(100vh - 40px);
}

/* User Menu Dropdown */
.user-menu {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.user-dropdown-toggle {
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.user-dropdown-toggle:hover {
    background: linear-gradient(135deg, #15c0dc 0%, #00a3bf 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    border-radius: 8px;
    z-index: 1002;
    margin-top: 5px;
    overflow: hidden;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: #2c3e50;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
    font-size: 14px;
}

.dropdown-content a:hover {
    background-color: #f8f9fa;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .user-menu {
        position: relative;
        top: auto;
        right: auto;
        text-align: center;
        margin-bottom: 20px;
    }
}

.navigation li:hover .navigation-submenu {
    display: flex;
}

.navigation li:hover li,
.navigation li:hover a {
    /* Inherit from parent */
}

.navigation li a:hover,
.navigation li:hover li a:hover {
    background: white;
    color: #15c0dc;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.navigation > li.active a {
    background: white;
    color: #15c0dc;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.navigation > li.active li a {
    background: #f8f9fa;
    color: #2c3e50;
}

/* Overview */
.overview-table img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Modern Feedback Boxes */
.feedback {
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    border-left: 5px solid;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.feedback.success {
    color: #27ae60;
    background-color: #d5f4e6;
    border-left-color: #27ae60;
}

.feedback.error {
    color: #e74c3c;
    background-color: #fdeaea;
    border-left-color: #e74c3c;
}

.feedback.info {
    color: #3498db;
    background-color: #e8f4fd;
    border-left-color: #3498db;
}

.header_right_box {
    position: absolute;
    top: 20px;
    right: 20px;
}

/* Modern Login Screen */
.login-page-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    margin: 40px 0;
}

.login-page-box .table-wrapper {
    display: contents;
}

.login-box {
    background: white;
    padding: 40px;
    color: #2c3e50;
}

.login-box h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 300;
}

.login-box input[type="text"],
.login-box input[type="password"] {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #2c3e50;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 15px 20px;
    margin-bottom: 15px;
    display: block;
    width: 100%;
    box-sizing: border-box;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.login-box input[type="text"]:focus,
.login-box input[type="password"]:focus {
    background-color: white;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.login-box input[type="submit"] {
    color: white;
    background: linear-gradient(135deg, #15c0dc 0%, #00a3bf 100%);
    border: none;
    padding: 15px 20px;
    margin-bottom: 15px;
    display: block;
    width: 100%;
    box-sizing: border-box;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-box input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.login-box .remember-me-label {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
    color: #6c757d;
}

.login-box .remember-me-checkbox {
    width: auto !important;
    margin-right: 10px;
    margin-bottom: 0 !important;
}

.login-box .link-forgot-my-password {
    text-align: center;
}

.login-box .link-forgot-my-password a {
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.login-box .link-forgot-my-password a:hover {
    color: #3498db;
    text-decoration: underline;
}

.login-box ::-webkit-input-placeholder {
    color: #adb5bd;
    opacity: 1;
}
.login-box ::-moz-placeholder {
    color: #adb5bd;
    opacity: 1;
}
.login-box :-ms-input-placeholder {
    color: #adb5bd;
    opacity: 1;
}
.login-box input:-moz-placeholder {
    color: #adb5bd;
    opacity: 1;
}

.register-box {
    background: linear-gradient(135deg, #15c0dc 0%, #00a3bf 100%);
    color: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.register-box h2 {
    color: white;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 300;
}

.register-box a {
    width: 100%;
    display: block;
    box-sizing: border-box;
    background-color: transparent;
    border: 2px solid white;
    padding: 15px 20px;
    margin-bottom: 15px;
    text-decoration: none;
    text-align: center;
    color: white;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.register-box a:hover {
    background-color: white;
    color: #15c0dc;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Error page */
.red-text {
    color: #e74c3c;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wrapper {
        padding: 0 10px;
    }

    .logo {
        font-size: 2rem;
        padding: 20px 0;
    }

    .container {
        padding: 20px;
        margin: 10px 0;
    }

    .login-page-box {
        grid-template-columns: 1fr;
        margin: 20px 0;
    }

    .login-box,
    .register-box {
        padding: 30px;
    }

    .navigation {
        justify-content: center;
        gap: 5px;
    }

    .navigation.right {
        position: static;
        justify-content: center;
        margin-top: 10px;
    }

    .navigation li a {
        padding: 8px 15px;
        font-size: 12px;
    }

    .container table {
        font-size: 14px;
    }

    .container table thead td,
    .container table tbody td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }

    .container {
        padding: 15px;
    }

    .login-box,
    .register-box {
        padding: 20px;
    }

    .navigation li a {
        padding: 6px 10px;
        font-size: 11px;
    }
}