/* ===== Global Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



/* ===== Global Styles ===== */
body {
    font-family: Arial, sans-serif;
    background: #eeeecd;
    color: #222;
    line-height: 1.6;
    text-shadow: 0 0 3px #3332;
}

html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.content {
    flex: 1;
}

a {
    color: #222;
    text-decoration: dotted underline;
}
a:hover {
    text-decoration: underline;
}

.container {
    width: 90%;
    max-width: 1000px;
    margin: auto;
}
.pre-container {
    width: 90%;
    max-width: 1000px;
    margin: 25px auto auto auto;
}
.pre-container .container {
    width: unset;
}



/* ===== Header ===== */
.site-header {
    background: #8f7425;
    color: white;
    padding: 10px 0;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: -5px;
}



/* ===== Logo & Title ===== */
.logo-title {
    display: flex;
    align-items: center;
    text-shadow: 0 0 10px #333a;
    gap: 15px;
}

.logo-title a {
    color: white;
    text-decoration: none;
}

.logo {
    height: 55px;
    width: 95px;
    -webkit-filter: drop-shadow(0 0 5px #333a);
    filter: drop-shadow(0 0 5px #333a);
}



/* ===== Navigation & User Links ===== */
.main-nav {
    margin-top: 5px;
}

.main-nav a, .user-login-links a {
    color: white;
    text-decoration: none;
    text-shadow: 0 0 5px #333a;
    margin-right: 20px;
    font-weight: bold;
}

.main-nav a:first-child {
    margin-left: 0;
}

.user-login-links a {
    margin: 0 20px;
}

.main-nav a:hover, .user-login-links a:hover {
    text-decoration: underline;
}



/* ===== User login box ===== */
.user-area {
    position: relative;
}

/* == If logged in == */
.user-box {
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    position: relative;
    border: 1px solid #b19339;
    background: #b1933969;
    border-radius: 5px;
    padding: 10px 15px;
    z-index: 1;
}

/* An invisible area the mouse can touch so the dropdown will stay visible: */
.invisible-spacer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px;
}

.avatar {
    height: 35px;
    width: 35px;
    border-radius: 20%;
    border: 1px solid #b19339;
}

.avatar_large {
    height: 100px;
    width: 100px;
    border-radius: 20%;
    border: 1px solid #b19339;
}

/* == Dropdown == */
.dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 56px;
    background: #614f19;
    padding: 10px;
    border-radius: 4px;
    width: 150px;
}

.dropdown a {
    display: block;
    color: white;
    padding: 8px 5px;
    text-decoration: none;
}

.dropdown a:hover {
    opacity: 0.7;
}

/* == Show dropdown on hover == */
.user-box:hover .dropdown {
    display: block;
}

/* == Not logged in == */
.user-login-links a {
    color: #fff;
    text-decoration: none;
}

.user-login-links a:hover {
    text-decoration: underline;
}



/* ===== Footer ===== */
.site-footer {
    background: #8f7425;
    color: white;
    text-shadow: 0 0 3px #333a;
    padding: 15px 0;
    margin-top: 40px;
    text-align: center;
}

.site-footer a {
    color: white;
    text-decoration: dotted underline;
}

.site-footer a:hover {
    text-decoration: underline;
}



/* ===== Form Styles ===== */
form {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #b19339;
}

.auth {
    width: 65%;
    margin-left: 17.5%;
    margin-right: 17.5%;
}

label {
    display: block;
    margin: 10px 0 5px;
}

input[type=text],
input[type=password] {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

input:disabled {
    background: #eee;
}

button {
    padding: 10px 15px;
    border: 1px solid #614f19;
    background: #b19339;
    color: #fff;
    font-weight: 500;
    border: none;
    cursor: pointer;
    margin-top: 15px;
    border-radius: 7.5px;
}

button:disabled {
    border: 1px solid #96875b;
    background: #b8a170;
    color: #eee;
    font-weight: 500;
    cursor: not-allowed;
}

button:hover {
    opacity: 0.85;
}



/* ===== Alert Bars ===== */
.alert_info {
    background: #2196f3;
    border: 1px solid #0b7dda;
    color: #333;
    padding: 10px;
    text-align: center;
    margin: 10px 0 25px 0;
    border-radius: 5px;
}

.alert_success {
    background: #4caf50;
    border: 1px solid #357a38;
    color: #333;
    padding: 10px;
    text-align: center;
    margin: 10px 0 25px 0;
    border-radius: 5px;
}

.alert_warning {
    background: #ffd000;
    border: 1px solid #da8301;
    color: #333;
    padding: 10px;
    text-align: center;
    margin: 10px 0 25px 0;
    border-radius: 5px;
}

.alert_error {
    background: #ff4c4c;
    border: 1px solid #da0101;
    color: #333;
    padding: 10px;
    text-align: center;
    margin: 10px 0 25px 0;
    border-radius: 5px;
}


/* ===== My Files Page ===== */
.storage-bar {
    width: 100%;
    height: 20px;
    background: #ddd;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.storage-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
}

.cloud-table {
    width: 100%;
    border-collapse: collapse;
}

.cloud-table th,
.cloud-table td {
    padding: 8px;
    border-bottom: 1px solid #ccc;
    text-align: left;
}

a:has(.action-button) {
    text-decoration: none;
}
.action-button {
    height: 20px;
    width: 20px;
    vertical-align: middle;
    filter: drop-shadow(0 0 2px rgba(51, 51, 51, 0.3));
    -webkit-filter: drop-shadow(0 0 2px rgba(51, 51, 51, 0.3));
}

.file-missing {
    color: red;
    font-weight: bold;
}

form[action="upload_cloud.php"] {
    padding: 25px;
}
form[action="upload_cloud.php"] button {
    margin-top: 0;
}

.technical-text {
    font-size: 12px;
    color: #666;
}



/* ===== 40x Error Pages ===== */

.error_div {
    filter: drop-shadow(0 0 4px #4446);
    -webkit-filter: drop-shadow(0 0 4px #4446);
}

.error_div h1 {
    font-weight: 900;
    font-size: 48px;
    text-align: center;
    -webkit-text-stroke: 1px black;
}
.error403 h1 {
    color: #ef6561;
}
.error404 h1 {
    color: #bb83d2;
}

.error_div img {
    width: 200px;
    height: auto;
    margin: auto;
    display: block;
    margin-bottom: 15px;
}

.error_div h4 {
    text-align: center;
    font-size: 20px;
}
.error403 h4 {
    text-transform: uppercase;
    letter-spacing: 1px;
}



/* ===== App Grid ===== */

.app-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 30px;
}

.app-card {
    background: white;
    border: 1px solid #b19339;
    border-radius: 8px;
    width: 200px;
    text-align: center;
    padding: 25px 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    height: 250px;
    position: relative;
}
.app-card:hover {
    transform: scale(1.05);
}

.app-card img {
    width: 150px;
    height: 150px;
    margin-bottom: 15px;
}

.app-card h3 {
    margin-bottom: 15px;
    position: absolute;
    bottom: 0;
    width: calc(100% - 50px);
    left: 25px;
    right: 25px;

    max-height: 45px;
    overflow: hidden;
    font-size: 14px;

    word-wrap: break-word;
}

.app-card .technical-text {
    position: absolute;
    bottom: 0px;
    font-size: 9px;
    width: calc(100% - 50px);
    left: 25px;
    right: 25px;
}


/* ===== Server Logs Page ===== */
.logs-table {
    width: 100%;
    border-collapse: collapse;
}

.logs-table th,
.logs-table td {
    padding: 8px;
    border-bottom: 1px solid #ccc;
    text-align: left;
}

.icon-inline {
    height: 28px;
    width: 28px;
    margin-right: 5px;
    filter: drop-shadow(0 0 2px rgba(51, 51, 51, 0.3));
    -webkit-filter: drop-shadow(0 0 2px rgba(51, 51, 51, 0.3));
}



/* ===== User Management Page ===== */

.user-management-table {
    width: 100%;
    border-collapse: collapse;
}

.user-management-table th,
.user-management-table td {
    padding: 8px;
    border-bottom: 1px solid #ccc;
    text-align: left;
}

.feature-toggle {
    font-weight: bold;
}

.user-management-table hr {
    border: none;
    border-top: 1px solid #888;
    margin: 10px 0;
}



/* ===== Smart Home Page ===== */

.climate-control-panel {
    background: white;
    border: 1px solid #b19339;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}


.temperature-slider-container {
    display: flex;
    justify-content: space-between;
    max-width: 550px;
    text-align: center;
    margin: 15px;
}
.temperature-slider-container h3 {
    margin: -10px 0 10px 0;
}
.temperature-slider-container .slider-box {
    padding: 20px;
    border: solid 1px #b19339;
    border-radius: 8px;
}
.temperature-slider-container .button-box {
    margin: 1.5px 0 0 17.5px;
    float: right;
    height: 80%;
    width: 47.5px;
}

.button-box button {
    display: block;
    height: 42.5%;
    width: 100%;
    font-size: 24px;
    line-height: 20px;
    padding: 5px 0;
    margin: 0;

    background: linear-gradient(180deg, #d8b54a, #af9443);
    border: solid 1px #b19339;
    border-radius: 8px;
}
.button-box button:first-child {
    margin-bottom: 35%;
}


.temperature-slider {
    float: left;
}
.temperature-slider .rs-handle {
    background-color: #f3f3f3;
    box-shadow: 0px 0px 4px 0px #000;
}
.temperature-slider .rs-tooltip-text {
    font-size: 25px;
    font-weight: bold;
}
.temperature-slider .rs-range-color {
    /*background: linear-gradient(90deg, #2196f3, #ff4c4c);*/
    background: linear-gradient(90deg, #2196f3 0%, #2196f3 5%, #4caf50 45%, #ff4c4c 85%, #ff4c4c 100%);
}
.temperature-slider .rs-path-color {
    background: #ffffffaa;
}
.temperature-slider .rs-start, .temperature-slider .rs-end {
    z-index: 0;
}












/*


===== Colour Palette: =====

Brightest Yellow: #ffd000
Yellow (Light): #b19339
Yellow (Medium): #8f7425
Yellow (Dark): #614f19

Disabled Yellow (Col): #b8a170
Disabled Yellow (Bor): #96875b

Semi-Transparent Yellow: #b1933969


==


===== Colour Usage: =====

#8f7425 - Header/Footer Background
#614f19 - Dropdown Background
#b19339 - Borders
#eeeecd - Body Background
#222 - Body Text
#fff - Text on Dark Backgrounds
#333a - Text Shadow on Dark Backgrounds
#2196f3 - Info Alert Background
#4caf50 - Success Alert Background
#ffd000 - Warning Alert Background
#ff4c4c - Error Alert Background


*/
